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 / 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@provider.com" -b 2048
- Change desktop background :)
- Install PHPstorm + Java
@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 / 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 / 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 / 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 / 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 / .htaccess 2
Created February 25, 2013 21:51
LARAVEL: .htaccess configuration on domain-factory
# Apache configuration file
# http://httpd.apache.org/docs/2.2/mod/quickreference.html
# Note: ".htaccess" files are an overhead for each request. This logic should
# be placed in your Apache config whenever possible.
# http://httpd.apache.org/docs/2.2/howto/htaccess.html
# Turning on the rewrite engine is necessary for the following rules and
# features. "+FollowSymLinks" must be enabled for this to work symbolically.
@tomraithel
tomraithel / .htaccess
Created February 25, 2013 21:50
.htaccess: Use subfolder as root folder
RewriteEngine on
RewriteCond $1 !^public/
RewriteRule ^(.*)$ /public/$1 [L]
@tomraithel
tomraithel / gist:4738040
Created February 8, 2013 10:44
CSS: Webkit specific rules / Webkit-Hack
// webkit-specific changes
@media screen and (-webkit-min-device-pixel-ratio:0) {
-webkit-appearance: none;
background: #fff img-url('arrow-icons.png') 100% -51px no-repeat;
padding-right: 35px;
}
@tomraithel
tomraithel / gist:4690179
Created February 1, 2013 08:51
bash: Sync a dir with amazon s3 bucket (s3cmd required)
s3cmd sync --acl-public --recursive out/* s3://bucket.s3.de/path/to/folder/