general updates

This commit is contained in:
Nemo 2019-03-28 11:55:28 +05:30
parent ab291fb0f3
commit ba3b566b01
5 changed files with 86367 additions and 1 deletions

11
archive-repo Executable file
View File

@ -0,0 +1,11 @@
#/bin/bash
ORG=$1
REPO=$2
REPOSITORY="$1/$2"
BRANCH=master
git checkout --orphan $REPO
git remote add -f $REPO git@github.com:$ORG/$REPO.git
git reset --hard $REPO/$BRANCH
git remote rm $REPO
git push origin $REPO
git checkout master

14
blacklist2hosts.php Executable file
View File

@ -0,0 +1,14 @@
#!/usr/bin/php
<?php
$filename= $argv[1];
$outputfile = $argv[2];
$f = fopen($outputfile, 'w');
foreach(file($filename) as $row) {
if (strlen(trim($row)) > 0 and trim($row)[0] != "#") {
fwrite($f, trim($row) . ' 0.0.0.0' . PHP_EOL);
}
}
fclose($f);

View File

@ -7,7 +7,7 @@ gettoken ()
}
# Based on https://gist.github.com/benkulbertis/fff10759c2391b6618dd/
CF_KEY=`gettoken CloudFlare/CF_KEY`
gettoken CloudFlare/CF_KEY
CF_EMAIL="capt.n3m0@gmail.com"
ZONE_IDENTIFIER="624d0d36f927426fdbeef7fb3770ac43"

86325
hosts Normal file

File diff suppressed because it is too large Load Diff

16
undelete Executable file
View File

@ -0,0 +1,16 @@
#!/bin/bash
if [[ ! $1 ]]; then
echo -e "Usage:\n\n\t$0 'file name'"
exit 1
fi
f=$(ls 2>/dev/null -l /proc/*/fd/* | fgrep "$1 (deleted" | awk '{print $9}')
if [[ $f ]]; then
echo "fd $f found..."
cp -v "$f" "$1"
else
echo >&2 "No fd found..."
exit 2
fi