I hereby claim:
- I am piperchester on github.
- I am piperchester (https://keybase.io/piperchester) on keybase.
- I have a public key whose fingerprint is 155A 4961 8165 C24D CAF1 6B44 1DB5 64BC A61F B37B
To claim this, I am signing this object:
| 1 import java.util.Scanner; | |
| 2 import java.util.*; | |
| 3 | |
| 4 /** | |
| 5 * Utility class for creating a usable CLI. | |
| 6 * Provides methods to do things like prompt the user, present an options list, etc. | |
| 7 */ | |
| 8 public class CLIUtilities { | |
| 9 | |
| 10 /** |
| // How to use this: | |
| // 1. Go to the desired profile page on coderwall, like http://coderwall.com/marcinbunsch | |
| // 2. Paste this gist in the JS console | |
| // | |
| // You can also probably use this in greasemonkey and dot.js | |
| // | |
| // Also, it was tested in Chrome, Firefox and Safari, it probably will | |
| // not work in IE, but I just don't care about it ;) | |
| // | |
| // UPDATE: Coderwall made changes to the site and I cannot retrieve the achievements, so they are hardcoded, taken from a cached version of the achievements page |
| containing-div { | |
| width: 100%; | |
| text-align: center /* Centering the text is necessary to center the input label. */ | |
| } |
| -- Two dashes start a one-line comment. | |
| --[[ | |
| Adding two ['s and ]'s makes it a | |
| multi-line comment. | |
| --]] | |
| ---------------------------------------------------- | |
| -- 1. Variables and flow control. | |
| ---------------------------------------------------- |
| # Termination statement must not be an expression | |
| # Termination statement should be the last call in the function | |
| def factorial(n, a): | |
| if n < 0: | |
| return 0 | |
| elif n == 0: | |
| return 1 | |
| elif n == 1: | |
| return a |
I hereby claim:
To claim this, I am signing this object:
| // Use Gists to store code you would like to remember later on | |
| console.log(window); // log the "window" object to the console |
| .cursor { | |
| width: 30px; | |
| height: 60px; | |
| background: green; | |
| -webkit-animation:blink .8s ease-in-out infinite; | |
| } | |
| @-webkit-keyframes blink { | |
| from { | |
| opacity: 1; |
| import os, re | |
| deleted = 0 | |
| previous_filename = '' | |
| sorted_files = sorted(os.listdir(os.curdir), reverse=True) # Sorts dir by reverse alpha, e.g. IMG_1.jpg, IMG_1 (1).jpg | |
| for file_name in sorted_files: | |
| if '(1)' in file_name: # TODO: extend to (1-9) | |
| match_filename = re.search('[\S][^.|\s]*', file_name) # Check we've previous dupe filed (safe to delete) | |
| if match_filename.group(0) in previous_filename: |
| uptime | |
| dmesg | tail | |
| vmstat 1 | |
| mpstat -P ALL 1 | |
| pidstat 1 | |
| iostat -xz 1 | |
| free -m | |
| sar -n DEV 1 | |
| sar -n TCP,ETCP 1 | |
| top |