Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.
$ python -m SimpleHTTPServer 8000| #!/bin/bash | |
| SITES=("https://www.kampiapina.com" "https://apina.studio") | |
| for i in "${SITES[@]}" | |
| do | |
| # Ask file with old version of TLS. Should return an error. | |
| curl $i --verbose --tlsv1.1 --tls-max 1.1 &> response.txt |
Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.
$ python -m SimpleHTTPServer 8000| from random import randint | |
| firstNames = ['Kalle', 'Lahna', 'Irma', 'Pekka', 'Jouko', 'Antti', 'Jaakko', 'Jalmari', 'Vihtori', 'Albert', 'Gandalf', 'Iron', 'Batman', 'Sandman'] | |
| lastNamesPart1 = ['Virta', 'Kahvi', 'Kala', 'Järvi', 'Niemi', 'Banaani', 'Laku', 'Kilpi', 'Sammakko', 'Pieru', 'Kakka', 'Lehmä', 'Räkä', 'Lima', 'Klöntti', 'Lanta', 'Lemu', 'Löyhkä', 'Yrjö', 'Vaippa', 'Sipuli', 'Kalja', 'Öljy'] | |
| lastNamesPart2 = ['nen', 'joki', 'kulma', 'järvi', 'kylä', 'kuisma', 'salo', 'lahti', 'tunkio', 'kasa', 'läjä', 'hiki', 'korva', 'nöyhtä', 'huuli'] | |
| def pickWord(words): | |
| return words[randint(0, len(words) - 1)] | |
| def generateName(): |
A Pen by Jaakko Alajoki on CodePen.
| #!/bin/bash | |
| # Simple mysqld start script for containers | |
| # We do not use mysqld_safe | |
| # Variables | |
| MYSQLD=mysqld | |
| LOG_MESSAGE="Docker startscript: " | |
| wsrep_recover_position= |
| # Set the default path | |
| set $root /var/www/html/dist; | |
| # Change the document root path based on user's ip address | |
| if ($remote_addr ~ "^(71\.134\.111\.38)$") { | |
| set $root /var/www/html/dist1; | |
| } | |
| # Set config | |
| root $root; |
| # OS X | |
| dd if=/dev/zero of=output.dat bs=24m count=1 | |
| # Linux | |
| dd if=/dev/zero of=output.dat bs=24M count=1 | |
| # Add some content to the file. | |
| perl -e 'print "x" x (1024*1024*120)' > test-120MB.jpg |
| # | |
| # Re-encode file | |
| # | |
| # -i input file | |
| # -b:v video bitrate | |
| # -c:v codec | |
| # -r framerate | |
| # -y overwrite output file | |
| # -t limit time | |
| # -s target size |
| #!/bin/bash | |
| # Print out a list of docker containers. | |
| i=0 | |
| firstrun=0 | |
| while read x | |
| do | |
| if [ $firstrun == 0 ] | |
| then | |
| echo "$x" |
| // Use Gists to store code you would like to remember later on | |
| console.log(window); // log the "window" object to the console |