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
| daemon off; | |
| pid /tmp/nginx-80-to-8888.pid; | |
| events { | |
| worker_connections 102480; | |
| multi_accept on; | |
| } | |
| http { | |
| server { |
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
| (defn run-process | |
| "Runs the process" | |
| [args] | |
| (->> | |
| (new ProcessBuilder args) | |
| (.start) | |
| )) | |
| (defn exec | |
| "Returns the ouput of the command, which is assumed to smallish and non-binary." |
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
| (defn wait-a-bi [] | |
| (do (println "waiting a bit") | |
| (. Thread (sleep 200)))) | |
| (first ((wait-a-bit) (wait-a-bit)) |
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 | |
| # For the duration of this script, don’t run .rvmrcs | |
| unset rvm_project_rvmrc | |
| orig_pwd=$PWD | |
| find . -name '*.git' -type d | while read repo; do | |
| # Starts a subshell, and thereby resetting pwd every time | |
| cd "$orig_pwd/$repo" |
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
| root@tel1:/etc/network# id | |
| uid=0(root) gid=0(root) groups=0(root) | |
| root@tel1:/etc/network# rm -f interfaces | |
| rm: cannot remove `interfaces': Operation not permitted | |
| root@tel1:/etc/network# ls -halps interfaces | |
| 4.0K -rw-r--r-- 1 root root 285 Jul 10 2011 interfaces |
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
| var parseResponseCookies = function (response) { | |
| var Cookie = function (cookieString) { | |
| var fields = cookieString.split(/; ?/).map(function (item) { | |
| return item.split('='); | |
| }); | |
| var metadata = fields.reduce(function (prev, curr) { | |
| prev[curr[0]] = curr[1]; | |
| return prev; | |
| }, {}); |
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
| spinOptions = | |
| lines: 12 | |
| length: 4 | |
| width: 2 | |
| radius: 4 | |
| color: '#333' | |
| fadeInTime = 400 | |
| minTime = 400 | |
| fadeOutTime = 600 |
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
| <?php | |
| $login = 'xxxxxxxx'; /* Username */ | |
| $password = 'xxxxxxxx'; /* Password */ | |
| $path = 'Test.pdf'; /* Path to file */ | |
| $recipient = '+43125330331115'; /* Recipient */ | |
| $handle = curl_init(); | |
| $url = 'https://' . $login . ':' . $password . '@faxonline.at/api-v1/faxes.json'; |
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(idx = 0; idx < 8; idx++) { | |
| with({index: idx}) { | |
| setTimeout(function() { console.log([idx, index]) }, 5); | |
| } | |
| } |
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(idx = 0; idx < 8; idx++) { | |
| var callback = function () { | |
| var index = idx; | |
| return function() { | |
| console.log(index); | |
| } | |
| }(); | |
| setTimeout(callback, 5); |