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
| SELECT CAST(date_part('year', date) AS varchar(4)) || '-' || CAST(date_part('month', date) AS varchar(2)) AS month, SUM(amount) | |
| FROM withdrawals | |
| WHERE some_predicate() | |
| GROUP BY month | |
| ORDER BY month; |
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
| export LANGUAGE=en_US.UTF-8 | |
| export LANG=en_US.UTF-8 | |
| export LC_ALL=en_US.UTF-8 | |
| locale-gen en_US.UTF-8 | |
| dpkg-reconfigure locales |
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
| (ns algo.stack) | |
| (defn make-stack [] {:first nil}) | |
| (defn is-empty? [stack] (nil? (:first stack))) | |
| (defn stack-push [stack item] | |
| (let [previous (:first stack)] | |
| {:first | |
| {:item item :next previous}})) |
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 i in `echo {0..95..5}`; do echo $i | awk '{print $i/100}'; done |
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
| GROUPS := $(shell for i in `echo {0..95..5}`; do echo $$i | awk '{print $$i/100}'; done) |
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
| echo "1234" | gpg --no-use-agent -o /dev/null --local-user <KEYID> -as - && echo "The correct passphrase was entered for this key" |
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
| fn swap(arr: &mut Vec<int>, i: uint, j: uint) -> &Vec<int> { | |
| let buf = arr[i]; | |
| arr[i] = arr[j]; | |
| arr[j] = buf; | |
| arr | |
| } | |
| fn insertion_sort(arr: &mut Vec<int>) -> &Vec<int> { | |
| for i in range(1, arr.len()) { | |
| let key = arr[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
| $ find . -wholename '*.py' -type f | xargs -n1 -I {} bash -c 'echo {}; grep -R settings {}' |
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
| #!/usr/bin/env python | |
| from pycurl import Curl | |
| def write(*args): | |
| pass | |
| if __name__ == '__main__': |
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
| #!/usr/bin/env python | |
| import pycurl | |
| import select | |
| def write(*args): | |
| pass | |
OlderNewer