Skip to content

Instantly share code, notes, and snippets.

View yochem's full-sized avatar

Yochem van Rosmalen yochem

View GitHub Profile
@yochem
yochem / stylus-in-gulp.js
Last active February 20, 2017 18:31
Using stylus in Gulp
# stylus plugin from https://github.com/stevelacy/gulp-stylus
# include this require in the variables on top
var stylus = require('gulp-stylus');
# Gulp task
gulp.task('stylus', function () {
return gulp.src('_stylus/*.styl')
.pipe(stylus({
includePaths: ['stylus'],
@yochem
yochem / fritzing.less
Created October 23, 2017 18:27
Fritzing File-Icons Atom
// 1. Download icon at https://upload.wikimedia.org/wikipedia/commons/a/a8/Fritzing_icon_%28new%29.png
// 2. Copy in terminal: $ mv "~/Downloads/Fritzing_icon_(new).png" ~/.atom/packages/fritzingicon.png
// Put this in your styles.less (Settings/Themes/Your stylesheet):
// Fritzing icon for .fzz extensions
.icon[data-name$=".fzz"]:before,
.icon[data-name$=".fzpz"]:before {
background-image: url("atom://fritzingicon.png");
background-size: 120%;
@yochem
yochem / gitpull
Last active April 19, 2018 20:11
Pull all your git repo's at once
#!/usr/bin/env bash
# 1. Put this file in your $PATH
# $ echo $PATH
# $ mv gitpull path/to/YOUR_PATH/gitpull
#
# 2. make it executable
# $ cd YOUR_PATH && chmod +x gitpull
#
# 3. now create a file '.gitrepos.txt' in your home directory
@yochem
yochem / .nanorc
Created May 11, 2018 11:13
All options for your .nanorc file
# ------------------------------------------------------------------
#
# All possible options for your .nanorc file as documented in the
# nanorc man page.
#
# ------------------------------------------------------------------
# When backing up files, allow the backup to succeed even if its per-
# missions can't be (re)set due to special OS considerations. You
@yochem
yochem / darkmode
Created January 4, 2019 12:49
Switch darkmode / lightmode from the command line
#!/usr/bin/env osascript
- place this script in your $PATH
tell application "System Events"
tell appearance preferences
set dark mode to not dark mode
end tell
end tell
SCRIPT /Users/Yochem/.config/nvim/pack/kite/start/vim-plugin/plugin/kite.vim
Sourced 1 time
Total time: 0.050532
Self time: 0.000945
count total (s) self (s)
1 0.000010 if exists('g:loaded_kite') || &cp || v:version < 700
finish
endif
1 0.000002 let g:loaded_kite = 1
+ 1556115072.040357000 dotfiles=(~/.config/bash/prompt ~/.config/bash/exports ~/.config/bash/aliases ~/.config/bash/functions /usr/local/etc/profile.d/bash_completion.sh ~/.z.sh ~/.config/iterm2/iterm2_shell_integration.bash)
+ 1556115072.054303000 for file in ${dotfiles[@]}
+ 1556115072.063813000 '[' -r /Users/Yochem/.config/bash/prompt ']'
+ 1556115072.070104000 '[' -f /Users/Yochem/.config/bash/prompt ']'
+ 1556115072.075548000 source /Users/Yochem/.config/bash/prompt
++ 1556115072.083907000 reset='\[\033[0;97m\]'
++ 1556115072.089392000 green='\[\033[0;92m\]'
++ 1556115072.094936000 magenta='\[\033[01;38;5;005m\]'
++ 1556115072.100540000 blue='\[\033[0;94m\]'
++ 1556115072.106096000 bold='\[\033[1m\]'
@yochem
yochem / results.sh
Last active September 10, 2019 19:04
#!/usr/bin/env bash
# use current directory if not specified
feedback_folder="${1:-$(pwd)}"
if [ "$(uname)" == "Darwin" ]; then
copy_tool="pbcopy"
else
copy_tool="xclip -i -selection c"
fi
numbers = [1, 2, 3, 4]
#############################
# general looping
#############################
for i in range(len(numbers)):
print(numbers[i])
# should be
for num in numbers:
@yochem
yochem / comfy.vim
Last active March 16, 2020 22:29
comfy.vim
set autoindent
set smartindent
set smarttab
set tabstop=8 softtabstop=4 shiftwidth=4 expandtab
set nostartofline
set number
set relativenumber
set scrolloff=3
set backspace=indent,eol,start
set mouse=a