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
| main() { | |
| # Use colors, but only if connected to a terminal, and that terminal | |
| # supports them. | |
| if which tput >/dev/null 2>&1; then | |
| ncolors=$(tput colors) | |
| fi | |
| if [ -t 1 ] && [ -n "$ncolors" ] && [ "$ncolors" -ge 8 ]; then | |
| RED="$(tput setaf 1)" | |
| GREEN="$(tput setaf 2)" | |
| YELLOW="$(tput setaf 3)" |
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 python3 | |
| # -*- coding: utf-8 -*- | |
| #First released as C++ program by Hiroyuki Tsutsumi as part of the free software suite “Beer” | |
| #I thought porting it to Python could be both a challenge and useful | |
| from sys import argv, exit, getsizeof | |
| from struct import pack_into, unpack_from | |
| def ceil4(n): |
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
| git config --global https.proxy http://127.0.0.1:1080 | |
| git config --global https.proxy https://127.0.0.1:1080 | |
| git config --global --unset http.proxy | |
| git config --global --unset https.proxy | |
| npm config delete proxy |
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
| // Use Gists to store code you would like to remember later on | |
| console.log(window); // log the "window" object to the console |