This file contains hidden or 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
// for : | |
// by keys | |
for (String i : capitalCities.keySet()) { | |
System.out.println("key: " + i + " value: " + capitalCities.get(i)); | |
} | |
This file contains hidden or 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
#!/bin/bash | |
# give it executable permission | |
# `chmod +x filename.sh` | |
echo "Total arguments : $#" | |
echo "1st Argument = $1" | |
echo "2nd argument = $2" |
This file contains hidden or 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
cat file.txt | tail -n 1 | bash - |
This file contains hidden or 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
# from: https://unix.stackexchange.com/questions/4004/how-can-i-run-a-command-which-will-survive-terminal-close | |
$ your-command-here & | |
$ disown |
This file contains hidden or 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
# /home/juan/.config/Code/User/settings.json | |
{ | |
"workbench.startupEditor": "newUntitledFile", | |
"telemetry.enableTelemetry": false, | |
"telemetry.enableCrashReporter": false, | |
"editor.minimap.enabled": false, | |
"editor.rulers": [80], | |
"workbench.colorCustomizations": { | |
"editorRuler.foreground": "#ff4081" | |
}, |
This file contains hidden or 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 subprocess | |
import sys | |
links = [ | |
# "http://openfing-video.fing.edu.uy/media/agpi/agpi_01.webm", | |
# "http://openfing-video.fing.edu.uy/media/agpi/agpi_02.webm", | |
# "http://openfing-video.fing.edu.uy/media/agpi/agpi_03.webm", | |
# "http://openfing-video.fing.edu.uy/media/agpi/agpi_04.webm", | |
# "http://openfing-video.fing.edu.uy/media/agpi/agpi_05.webm", | |
# "http://openfing-video.fing.edu.uy/media/agpi/agpi_06.webm", |
This file contains hidden or 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
`sudo dpkg --add-architecture i386` | |
`sudo apt-get update` | |
`sudo apt-get install libsdl1.2-dev:i386` | |
`sudo apt-get install gcc-multilib g++-multilib` | |
`g++ main.cpp -w -lSDL -lSDLmain -m32 -lGL -lGLU -I/usr/include/SDL -L/usr/lib/i386-linux-gnu -o main.o` | |
`./main.o` | |
main.cpp | |
```` | |
#include "SDL.h" |
This file contains hidden or 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
# https://www.geeksforgeeks.org/python-map-function/ | |
import time | |
def foo(bar): | |
time.sleep(2) | |
return 'foo ' + str(bar) | |
from multiprocessing.pool import ThreadPool | |
pool = ThreadPool(processes=4) |
This file contains hidden or 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
proj #commits LOCs | |
================================================ | |
tprog 666 21,729 | |
truco 343 10,612 | |
truco-cli-web 104 1,901 | |
truco-srv-cli 46 1,532 | |
truquito-vue 128 ? | |
truquito-web 17 ? | |
truquito-api 32 ? | |
truquito-db 9 ? |
This file contains hidden or 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 subprocess | |
cmd = ['./stub'] | |
proc = subprocess.Popen( | |
cmd, | |
stdin=subprocess.PIPE, | |
stdout=subprocess.PIPE, | |
stderr=subprocess.PIPE | |
) |
OlderNewer