Skip to content

Instantly share code, notes, and snippets.

View scoping.rb
# frozen_string_literal: true
require "bundler/inline"
gemfile(true) do
source "https://rubygems.org"
git_source(:github) { |repo| "https://github.com/#{repo}.git" }
gem "rails", github: "rails/rails"
View sizes.scss
/* responsive version for sizes, we don't generate xs because it is arleady generated by bootstrap */
@each $breakpoint in map-keys($grid-breakpoints) {
@if $breakpoint != "xs" {
@include media-breakpoint-up($breakpoint) {
$infix: breakpoint-infix($breakpoint, $grid-breakpoints);
@each $prop, $abbrev in (width: w, height: h) {
@each $size, $length in $sizes {
.#{$abbrev}#{$infix}-#{$size} { #{$prop}: $length !important; }
}
}
View lightworks crash on macOs Sierra
Process: Lightworks [905]
Path: /Applications/Lightworks.app/Contents/MacOS/Lightworks
Identifier: com.editshare.lightworks
Version: 1.0 (1)
Code Type: X86-64 (Native)
Parent Process: ??? [1]
Responsible: Lightworks [905]
User ID: 501
Date/Time: 2016-08-04 13:34:02.955 +0200
@madmax
madmax / cache_key_test.rb
Created Jun 21, 2016
cache_key timestamp not calculated when using offset
View cache_key_test.rb
begin
require 'bundler/inline'
rescue LoadError => e
$stderr.puts 'Bundler version 1.10 or later is required. Please update your Bundler'
raise e
end
gemfile(true) do
source 'https://rubygems.org'
gem 'rails', github: 'rails/rails'
View github_pull.sh
#!/bin/bash
GITHUB_USER="madmax"
if [ "$1" != "" ]; then
echo "Merging pull request $1"
OUT=`basename $1`
curl --user $GITHUB_USER $1.patch > $OUT.patch
git am -s --3way --ignore-space-change $OUT.patch
rm $OUT.patch
else
View .vimrc
""" Code folding options
nmap <leader>0 :set foldlevel=0<CR>
nmap <leader>1 :set foldlevel=1<CR>
nmap <leader>2 :set foldlevel=2<CR>
nmap <leader>3 :set foldlevel=3<CR>
nmap <leader>4 :set foldlevel=4<CR>
nmap <leader>5 :set foldlevel=5<CR>
nmap <leader>6 :set foldlevel=6<CR>
nmap <leader>7 :set foldlevel=7<CR>
nmap <leader>8 :set foldlevel=8<CR>
View .vimrc
set nocompatible
call pathogen#infect()
call pathogen#helptags()
syntax on
filetype plugin indent on
" swp to one directory outside project
" set backupdir=~/.vim/tmp,.
View .vimrc
set nocompatible
call pathogen#infect()
call pathogen#helptags()
syntax on
filetype plugin indent on
" swp to one directory outside project
" set backupdir=~/.vim/tmp,.
View .vimrc
set nocompatible
call pathogen#infect()
call pathogen#helptags()
syntax on
filetype plugin indent on
" swp to one directory outside project
" set backupdir=~/.vim/tmp,.