Skip to content

Instantly share code, notes, and snippets.

View tomraithel's full-sized avatar
🏠
Working from home

Tom Raithel tomraithel

🏠
Working from home
View GitHub Profile
@tomraithel
tomraithel / gist:5160587
Created March 14, 2013 11:21
CSS: remove ipad top shadow on input elements
// remove ipad top shadow
input[type="text"], input[type="email"], input[type="search"], input[type="password"] {
-webkit-appearance: caret;
-moz-appearance: caret; /* mobile firefox too! */
}
@tomraithel
tomraithel / gist:8113314
Created December 24, 2013 13:24
MySQL-Dump with MAMP
/Applications/MAMP/Library/bin/mysqldump --opt -u root -p DATABASENAME > DUMBNAME.sql
@tomraithel
tomraithel / keybindings.json
Last active February 22, 2016 14:10
Personal Visual Studio Code Settings & Keybindings
// Place your key bindings in this file to overwrite the defaults
[
{
"key": "alt+down",
"command": "editor.action.moveLinesDownAction",
"when": "editorTextFocus"
},
{
"key": "alt+up",
"command": "editor.action.moveLinesUpAction",
@tomraithel
tomraithel / annoy-corworkers.sh
Last active January 21, 2016 12:43
Annoy coworkers
nohup /bin/bash -c 'WORDS=("please help me" "i am so alone" "i am lonely" "pssssst" "hello" "hey, listen."); while [ 1 = 1 ]; do say "${WORDS[$[ $[ RANDOM % ${#WORDS[@]} ]]]}" -v Whisper -r 1.5; sleep 3; done' &
@tomraithel
tomraithel / Untitled-3
Created January 21, 2016 15:15
Cycle.js
import Cycle from '@cycle/core';
import {div, label, input, h1, button, p, makeDOMDriver} from '@cycle/dom';
const _ = require('lodash');
const {Observable} = require('rx');
function f1(sources) {
const sinks = {
DOM: sources.DOM.select('.field').events('input')
.map(ev => ev.target.value)
.startWith('12')
@tomraithel
tomraithel / Set_up_a_new_mac.txt
Last active April 11, 2024 14:02
Stuff I use to install if I setup a new mac
- Change the root password!
- System Settings > Security
- General: Set Password required to "instant"
- FileVault: activate
- System Setting > Keyboard
- Set all key speeds to "fast"
- Mark checkbox to use "fn" keys without option key
- Generate SSH-Key: ssh-keygen -t rsa -C "[email protected]" -b 2048
- Change desktop background :)
- Install PHPstorm + Java
@tomraithel
tomraithel / extract-glyphs.py
Created October 25, 2016 14:29
Create svg files from an icon-font
import sys
if len(sys.argv) < 2:
print 'Usage: python {} webfont-file.svg'.format(sys.argv[0])
sys.exit()
with open(sys.argv[1], 'r') as r:
lines = r.read().split('\n')
glyphs = [x for x in lines if '<glyph' in x]
# for every glyph element in the file
for i in range(0, len(glyphs)):
@tomraithel
tomraithel / code-review
Last active August 2, 2017 11:52 — forked from evant/code-review
A ruby script to automatically create crucible reviews
#!/usr/bin/env ruby
# A script to create a review on crucible based on the current git branch
#
# To configure settings, create a file named .code-review in your home directory
# The format should be:
# ------------------------------------------------------------------------------
# crucible:
# url: <crucible url>
# username: <username>
# password: <password>
@tomraithel
tomraithel / guide.md
Last active July 16, 2018 08:18
New Mac Installation
@tomraithel
tomraithel / showDataQa.js
Created January 19, 2018 10:43
Snippet to display data-qa attributes on a site
const cssText = `
[data-qa] {
outline: 1px solid #E91E63 !important;
}
[data-qa]:hover {
outline: 2px solid #E91E63 !important;
}
[data-qa]:hover:before {
display: block;
white-space: nowrap;