It's really all I ever want to do with awk
$ echo "my name is Al" | awk '{print $4 " " $3 " " $2}'
Al is name
$ sudo dpkg -i
require 'rspec' | |
class CoinChange | |
def least_coins(returned_money) | |
result = [] | |
if returned_money >= 25 | |
quantity_of_quarters = returned_money / 25 | |
quantity_of_quarters.times do | |
result << 25 | |
end |
# Your init script | |
# | |
# Atom will evaluate this file each time a new window is opened. It is run | |
# after packages are loaded/activated and after the previous editor state | |
# has been restored. | |
# | |
# An example hack to log to the console when each text editor is saved. | |
# | |
# atom.workspace.observeTextEditors (editor) -> | |
# editor.onDidSave -> |
# Your keymap | |
# ~/.atom/keymap.cson | |
# | |
# Atom keymaps work similarly to style sheets. Just as style sheets use | |
# selectors to apply styles to elements, Atom keymaps use selectors to associate | |
# keystrokes with events in specific contexts. Unlike style sheets however, | |
# each selector can only be declared once. | |
# | |
# You can create a new keybinding in this file by typing "key" and then hitting | |
# tab. |
#print skull and crossbones using UTF-8 | |
echo -e "\xE2\x98\xA0" | |
# in one terminal | |
$ nc -l 1234 | |
# then in irb | |
```ruby | |
require 'socket' | |
s = TCPSocket.new 'localhost', 1234 |
#!/bin/bash | |
a=( $(xinput list-props "CyPS/2 Cypress Trackpad" | grep 'Tap Action') ) | |
if [[ ${a[4]} == "2," ]] | |
then | |
xinput set-prop "CyPS/2 Cypress Trackpad" "Synaptics Tap Action" 0 | |
echo Tap to click is now off | |
else | |
xinput set-prop "CyPS/2 Cypress Trackpad" "Synaptics Tap Action" 2, 3, 0, 0, 1, 3, 2 | |
echo Tap to click is now on |
#!/bin/bash | |
##################################################### | |
# Name: Bash CheatSheet for Mac OSX | |
# | |
# A little overlook of the Bash basics | |
# | |
# Usage: | |
# | |
# Author: J. Le Coupanec | |
# Date: 2014/11/04 |
# I have forked a much more complete cheat sheet, but is complete at the expense of being accessable | |
# You can find that bigger cheat sheet here https://gist.github.com/fathergoose/3fbc3b5f6c0ba3cbe367b18030b39aba | |
# things in <angleBrackts> are variables to be replaced for a spcific instance of the command | |
# Getting Help | |
man <command> # Read the man(ual) page entry for a given command (detailed help) | |
<command> --help # This *usually* prints a short summary of a command's options and arguments | |
# Directories |
hey, this is content too |
#!/bin/sh | |
# | |
# Check for debugger statements before commiting your code. | |
# | |
# Nodejs uses 'debugger' as a keyword statement to trigger a | |
# breakpoint. There's literally no reason to commit such a thing | |
echo "Running debugger check..." | |
RES=`git grep -n 'debugger'` |