mirror of https://github.com/captn3m0/Scripts.git
general updates
This commit is contained in:
parent
ab291fb0f3
commit
ba3b566b01
|
@ -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
|
|
@ -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);
|
2
dydns.sh
2
dydns.sh
|
@ -7,7 +7,7 @@ gettoken ()
|
||||||
}
|
}
|
||||||
|
|
||||||
# Based on https://gist.github.com/benkulbertis/fff10759c2391b6618dd/
|
# Based on https://gist.github.com/benkulbertis/fff10759c2391b6618dd/
|
||||||
CF_KEY=`gettoken CloudFlare/CF_KEY`
|
gettoken CloudFlare/CF_KEY
|
||||||
CF_EMAIL="capt.n3m0@gmail.com"
|
CF_EMAIL="capt.n3m0@gmail.com"
|
||||||
|
|
||||||
ZONE_IDENTIFIER="624d0d36f927426fdbeef7fb3770ac43"
|
ZONE_IDENTIFIER="624d0d36f927426fdbeef7fb3770ac43"
|
||||||
|
|
|
@ -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
|
Loading…
Reference in New Issue