This file contains 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
# 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 |
This file contains 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 | |
##################################################### | |
# Name: Bash CheatSheet for Mac OSX | |
# | |
# A little overlook of the Bash basics | |
# | |
# Usage: | |
# | |
# Author: J. Le Coupanec | |
# Date: 2014/11/04 |
This file contains 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 | |
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 |
This file contains 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
#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 |
This file contains 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
# 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. |
This file contains 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
# 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 -> |
This file contains 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
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 |
NewerOlder