Skip to content

Instantly share code, notes, and snippets.

@jaibeee
jaibeee / brew-perms.sh
Last active February 15, 2024 22:49
Configure homebrew permissions to allow multiple users on MAC OSX. Any user from the admin group will be able to manage the homebrew and cask installation on the machine.
#!/bin/sh
# Configure homebrew permissions to allow multiple users on MAC OSX.
# Any user from the admin group will be able to manage the homebrew and cask installation on the machine.
# allow admins to manage homebrew's local install directory
chgrp -R admin /usr/local
chmod -R g+w /usr/local
# allow admins to homebrew's local cache of formulae and source files
chgrp -R admin /Library/Caches/Homebrew
@ctweney
ctweney / calendar.rb
Created October 30, 2014 20:07
Batch API calls don't observe auto_refresh_token setting
require 'rubygems'
require 'google/api_client'
require 'google/api_client/client_secrets'
require 'google/api_client/auth/file_storage'
require 'sinatra'
require 'logger'
enable :sessions
CREDENTIAL_STORE_FILE = "#{$0}-oauth2.json"
@JunichiIto
JunichiIto / alias_matchers.md
Last active April 16, 2024 16:18
List of alias matchers in RSpec 3

This list is based on aliases_spec.rb.

You can see also Module: RSpec::Matchers API.

matcher aliased to description
a_truthy_value be_truthy a truthy value
a_falsey_value be_falsey a falsey value
be_falsy be_falsey be falsy
a_falsy_value be_falsey a falsy value
@staltz
staltz / introrx.md
Last active April 25, 2024 04:18
The introduction to Reactive Programming you've been missing
@bomberstudios
bomberstudios / sketch-plugins.md
Last active February 26, 2024 07:02
A list of Sketch plugins hosted at GitHub, in no particular order.
@kianoshp
kianoshp / _arrow-box-mixin.scss
Last active December 25, 2015 00:09
A Sass mixin to create arrow boxes (similar to tooltips) borrowing from http://cssarrowplease.com, I created the following:
//Setting the initial border color to be red
$red: #9d261d;
//this mixin will set the box-shadow values. It will also allow for the felxibility of
//doing an inset shadow.
@mixin box-shadow ($isInset: false, $hOffset: 0, $vOffset: 0, $blur: 0, $spread: 0, $color: #ccc) {
@if $isInset {
-moz-box-shadow: inset $hOffset $vOffset $blur $spread $color;
-webkit-box-shadow: inset $hOffset $vOffset $blur $spread $color;
box-shadow: inset $hOffset $vOffset $blur $spread $color;
@emilsoman
emilsoman / custom_auth_failure_app.rb
Last active March 3, 2021 12:49
Custom failure app to render a custom json on auth failure
class CustomAuthFailure < Devise::FailureApp
def respond
self.status = 401
self.content_type = 'json'
self.response_body = {"errors" => ["Invalid login credentials"]}.to_json
end
end
@twalker
twalker / sublimetext_useful_shortcuts_pc.md
Last active July 10, 2021 11:34
A fork of useful sublime text keyboard shortcuts. Using markdown and making more readable from github.

Sublime Text - Useful Shortcuts (linux)

Sublime Text 3 documentation
= Right Mouse Button
= Left Mouse Button
= Shift
= Delete
= Enter
←↑→↓ = Arrow keys

Editing

@metaskills
metaskills / gist:3170386
Created July 24, 2012 14:47
Mapping A Sass List To A Comma Separated Selector
// Using this code below, I was able to itterate over a list of
// color names and append them to an empty list. I was then able
// to use the selectors from there.
$selectors: ();
@each $value in $my-colors-names {
$selector: unquote(".box.#{$value} .box-header");
$selectors: append($selectors, $selector, comma);
}
#{$selectors} { @extend .color-white; }
@mrdanadams
mrdanadams / create_origin.sh
Created November 22, 2011 20:48
Private github repos
$ cd git
$ mkdir yourproject.git
$ cd yourproject.git
$ git --bare init