Skip to content

Instantly share code, notes, and snippets.

View gustaflindqvist's full-sized avatar
🚴‍♂️
Focusing

Gustaf Lindqvist gustaflindqvist

🚴‍♂️
Focusing
View GitHub Profile
The value "device-width;" for key "width" is invalid, and has been ignored. alpint-stortlopp-traning-27963.html:8
The value "1.0;" for key "initial-scale" was truncated to its numeric prefix. alpint-stortlopp-traning-27963.html:8
The value "1.0;" for key "maximum-scale" was truncated to its numeric prefix. alpint-stortlopp-traning-27963.html:8
Error parsing a meta element's content: ';' is not a valid key-value pair separator. Please use ',' instead. alpint-stortlopp-traning-27963.html:8
Resource interpreted as Script but transferred with MIME type text/html: "http://os.viaplay.se/live/live.json?callback=D3PodiumLiveEvents&_=1391678355563". frameworks.js?20140126093037:207
body.scrollTop is deprecated in strict mode. Please use 'documentElement.scrollTop' if in strict mode and 'body.scrollTop' only if in quirks mode. page_context.js:225
body.scrollLeft is deprecated in strict mode. Please use 'documentElement.scrollLeft' if in strict mode and 'body.scrollLeft' only if in quirks mode. page_context.js:225
Uncau
class ActiveRecord::Base
def can_destroy?
self.class.reflect_on_all_associations.all? do |assoc|
assoc.options[:dependent] != :restrict || (assoc.macro == :has_one && self.send(assoc.name).nil?) || (assoc.macro == :has_many && self.send(assoc.name).empty?)
end
end
end
@gustaflindqvist
gustaflindqvist / AppDelegate.swift
Created July 20, 2014 21:06
Possible solution
var appToken = "<YOUR-APP-TOKEN>"
Lookback.setupWithAppToken(appToken)
var lookback: Lookback = Lookback()
lookback.shakeToRecord = true;

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname
@gustaflindqvist
gustaflindqvist / sv.yml
Last active August 29, 2015 14:15 — forked from lindblom/sv.yml
# Det måste vara en tom rad här av någon anledning :)
sv:
date:
formats:
default: "%Y-%m-%d"
short: "%b %d"
long: "%B %d, %Y"
day_names: [Söndag, Måndag, Tisdag, Onsdag, Torsdag, Fredag, Lördag]
abbr_day_names: [Sön, Mån, Tis, Ons, Tors, Fre, Lör]
E:\>setup.exe /ACTION=install /SKIPRULES=PerfMonCounterNotCorr
Microsoft (R) SQL Server 2008 R2 Setup 10.50.1600.01
Copyright (c) Microsoft Corporation. All rights reserved.
@gustaflindqvist
gustaflindqvist / gist:999097
Created May 30, 2011 16:11
Sinatra Stylesheet Expires
get "/css/foo.css" do
content_type 'text/css'
response['Expires'] = (Time.now + 60*60*24*356*3).httpdate
end
@gustaflindqvist
gustaflindqvist / gist:1904401
Created February 24, 2012 23:01
Problem with Homebrew when running upgrade
/usr/local/Library/Homebrew/global.rb:43: warning: Insecure world writable dir /usr/local/git/bin in PATH, mode 040777
/usr/local/bin/brew:74: warning: Insecure world writable dir /usr/local/git/bin in PATH, mode 040777
Error: no such file to load -- formula_support
Please report this bug:
https://github.com/mxcl/homebrew/wiki/checklist-before-filing-a-new-issue
/usr/local/Library/Homebrew/formula.rb:3:in `require'
/usr/local/Library/Homebrew/formula.rb:3
/usr/local/Library/Homebrew/formula_installer.rb:2:in `require'
/usr/local/Library/Homebrew/formula_installer.rb:2
/usr/local/Library/Homebrew/cmd/install.rb:1:in `require'
#if ( $is_signed_in && ($permissionChecker.isOmniadmin() ) )
$theme.include($top_head_include)
#else
<script type="text/javascript">
// hack catching exceptions
Liferay = function() {return {};}();
Liferay.Portlet = {
isAjax: function(id) {return true;},
process: function(id) {}
};
@gustaflindqvist
gustaflindqvist / gist:4195333
Created December 3, 2012 14:25 — forked from digitaljhelms/gist:3014302
Sublime Text 2 bash alias & CLI function to open projects without using the `.sublime-project` file extension
# bash alias
alias subl='/Applications/Sublime\ Text\ 2.app/Contents/SharedSupport/bin/subl'
# bash function, usage: $ st -p [projectname] -opt2 -opt3
function st() {
if [ -n "$1" -a -n "$2" ]; then # if more than one argument
if [ "$1" = "-p" -o "$1" = "--project" ]; then # if arg1 is -p or --project
local projectfile="$2"
[[ $projectfile != *.sublime-project ]] && projectfile="$2.sublime-project" # detect if arg2 already includes the ext
if [ -e $projectfile ]; then # does project file exist?