This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Assuming you only require from index.js | |
# and you use const | |
# and you use const at the beginning of a line | |
# and there aren't other things like child_process to filter out | |
npm install $(egrep ^'const(.*)= require' index.js | egrep -v '/|child_process' | cut -f2 -d\' | xargs) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
p=1000;l=72;t=3;c=",";n="\n";z=0;w=" ";e=f="";P=p%l;(1..(4*l/t-(2+P+(P/t).floor))).each{|i|f+=w};(1..p).each{|i|q=(p-i+1);print(((i==1)?f.to_s+1.to_s():e)+(((q%t== 0)?c+((q%l==0)?n:e):e)+z.to_s)+((i==p)?n:e))}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ctf api CollabNet->getProjectListForUser USERNAME | |
foreach | |
do | |
copy as project | |
mkdir "$project.title" | |
tools wiki | |
foreach | |
do | |
copy as wiki | |
if wikitext |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Find all RPMs of libraries for binaries in this folder | |
rpm -qf $(ldd * | grep = | awk '{print $3}' | sort -u | grep ^/) | sort -u | |
# Similarly, for all .so files under this folder | |
rpm -qf $(find . -name \*.so -exec ldd {} \; | grep = | awk '{print $3}' | sort -u | grep ^/) | sort -u |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# replace with your variable name | |
variable=$(echo ${variable} 1 + f | dc) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Verifying that +nicdoye is my blockchain ID. https://onename.com/nicdoye |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="UTF-16"?> | |
<Task version="1.2" xmlns="http://schemas.microsoft.com/windows/2004/02/mit/task"> | |
<RegistrationInfo> | |
<Date>2016-09-20T11:25:05.3204</Date> | |
<Author>SOMESERVER\Administrator</Author> | |
<Description>Simple reboot task</Description> | |
</RegistrationInfo> | |
<Triggers> | |
<TimeTrigger> | |
<StartBoundary>2016-09-21T06:00:00</StartBoundary> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function lgrep { | |
local str=$1 | |
find . -type f -not -path '*/.git/*' -exec grep -l ${str} {} \; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# A quick alias for those of us without such a command | |
tiff2png () | |
{ | |
local ifile=$1 | |
local ofile=$(dirname "${ifile}")/$(basename "${ifile}" .tiff).png | |
tifftopnm < "${ifile}"| pnmtopng > "${ofile}" | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import org.apache.commons.csv.CSVPrinter | |
import org.apache.commons.csv.CSVFormat | |
CSVPrinter printer = new CSVPrinter( | |
new PrintWriter("test.csv"), | |
CSVFormat.DEFAULT | |
) | |
answer = [ [5,6,"asdf",7],[9,10,"a b","z,x",12]] |