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 . -name filename -exec grep search {} \; |
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
sc queryex {SERVICE_NAME} | |
::get the name from the properties in the ui | |
taskkill /PID {PID} /F | |
::get the pid from the output of the previous command | |
::Or more concisely | |
taskkill /F /FI "SERVICES eq {service-name}" |
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
var csv = CsvSerializer.SerializeToCsv(new[]{ | |
new Dog () { | |
Bark = "Woof!", | |
Male = true, | |
Size = 10 | |
}}); |
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
convert -delay 50 *.jpg -loop 0 output.gif |
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
docker build -t [TAG] . | |
# build an image from a Dockerfile in the current directory with the tagname. | |
docker create --name=[NAME] [TAG] | |
# create a container called [NAME] built from the image [TAG] | |
docker start [NAME] | |
# start the [NAME] container | |
docker ps -a | |
# list all (running and stopped containers) | |
docker rm [NAME] | |
# delete [NAME] container |
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
flushall #deletes all | |
sentinel masters #lists the master redis instances |
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
git update-server-info | |
mv .git/hooks/post-update.sample .git/hooks/post-update | |
python -m SimpleHTTPServer | |
#in another shell | |
git clone http://localhost:8000/.git my-repo | |
cd my repo |
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
//Create a synthdef | |
SynthDef(\name, { arg freq=440; | |
Out.ar([0,1], SinOsc.ar(freq, 0, Line.kr(0.5, 0, 0.5, doneAction:2))) | |
}).add; | |
Synth(\name, [\freq, 220]); | |
//Create a pattern | |
Pdef(\pattern, | |
Pbind(\instrument, \name, \dur, 0.15, \degree, Pseq([5, 3, 1], inf)) |
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
#put this in /etc/init/service.conf, for more info, see http://upstart.ubuntu.com/ | |
start on startup | |
task | |
setuid username # will be root if this is not specified | |
exec /path/to/command |
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
ionic run --devices (run on your phone) |