Skip to content

Instantly share code, notes, and snippets.

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

David Lonjon davidlonjon

🏠
Working from home
View GitHub Profile
@Demwunz
Demwunz / scss_loop.scss
Last active August 29, 2015 13:56
scss_each_loop.scss
/*
* a way to save time when you want to output a bunch of class names with corresponding filenames
*/
$icons: sprite-map("icons/*.png");
.select-custom--icons{
background-image: sprite-url($icons);
background-color:white;
background-repeat: no-repeat;
}
$languages : (en, zh-cn, ja, it, pt, es, de);
@davidlonjon
davidlonjon / .jscsrc
Last active August 29, 2015 14:20
.jscsrc
{
"requireCurlyBraces": [ "if", "else", "for", "while", "do" ],
"requireSpaceAfterKeywords": ["if", "else", "for", "while", "do", "switch", "return", "try", "catch"],
"requireSpacesInFunctionExpression": {
"beforeOpeningCurlyBrace": true
},
"disallowSpacesInFunctionExpression": {
"beforeOpeningRoundBrace": true
},
"requireSpacesInFunctionDeclaration": {"beforeOpeningCurlyBrace": true},
@focusaurus
focusaurus / ncsend.sh
Created October 17, 2012 19:05
Transfer clipboard text from one mac to another via netcat
NCSEND_PORT=6666
ncsend() {
local DEST_HOST="${1-smair}"
pbpaste | nc "${DEST_HOST}" "${NCSEND_PORT}"
}
ncreceive() {
while true
do
nc -l "${NCSEND_PORT}" | tee /dev/tty | pbcopy
@davidlonjon
davidlonjon / .jshintrc
Last active September 12, 2016 11:17
jshintrc
{
// --------------------------------------------------------------------
// JSHint Configuration, Strict Edition
// --------------------------------------------------------------------
//
// This is a options template for [JSHint][1], using [JSHint example][2]
// and [Ory Band's example][3] as basis and setting config values to
// be most strict:
//
// * set all enforcing options to true
@laurentlemaire
laurentlemaire / watchandsync
Created June 30, 2014 07:01
Vagrant rsync watcher (Mac osx)
#!/bin/sh
##
# Keep local path in sync with remote path on server.
# Ignore .git metadata.
#
local=$BASEDIR
project='projetctname'
remote='root@vagrantbox.com:/var/www/'$project
# Initialization - copy entire directory to host
@victorbstan
victorbstan / SASS_rouded_corner_mixins.sass
Created March 27, 2011 18:48
SASS cross browser rounded corner mixins
$default_rounded_amount: 5px
// Round corner at position by amount.
@mixin round-corner($position, $amount: $default_rounded_amount)
border-#{$position}-radius: $amount
-webkit-border-#{$position}-radius: $amount
@mixin round-corner-mozilla($position, $amount: $default_rounded_amount)
-moz-border-radius-#{$position}: $amount
// Round left corners by amount
@uberbuilder
uberbuilder / Default (OSX).sublime-keymap
Created January 28, 2013 17:48
How to Create a Date Time Stamp in Sublime Text 2 on a Mac
[
{"keys": ["super+alt+ctrl+d"], "command": "add_date_time_stamp" },
{"keys": ["super+alt+d"], "command": "add_date_stamp" },
{"keys": ["super+alt+t"], "command": "add_time_stamp" }
]
@bjorgvino
bjorgvino / yosemite ntfs read+write.txt
Last active December 2, 2021 03:58
osxfuse + ntfs-3g + Yosemite = NTFS R/W
Remove osxfuse if installed via homebrew:
> brew uninstall osxfuse
Install osxfuse binary and choose to install the MacFUSE compatibility layer:
http://sourceforge.net/projects/osxfuse/files/latest/download?source=files
Reboot (optional but recommended by osxfuse)
Install ntfs-3g via homebrew:
> brew update && brew install ntfs-3g
@nl5887
nl5887 / transfer.fish
Last active March 22, 2022 09:07
Bash and zsh alias for transfer.sh. Transfers files and directories to transfer.sh.
function transfer
if test (count $argv) -eq 0
echo "No arguments specified. Usage:\necho transfer /tmp/test.md\ncat /tmp/test.md | transfer test.md"
return 1
end
## get temporarily filename, output is written to this file show progress can be showed
set tmpfile ( mktemp -t transferXXX )
## upload stdin or file
@nuxlli
nuxlli / sublime_text_2_useful_shortcuts.md
Created September 9, 2011 18:51 — forked from lucasfais/gist:1207002
Sublime Text 2 - Useful Shortcuts

Sublime Text 2 - Useful Shortcuts

Tested in Mac OS X: super == command

Open/Goto


  • super+t: go to file
  • super+ctrl+p: go to project
  • super+r: go to methods