Skip to content

Instantly share code, notes, and snippets.

{
"token_type": "Bearer",
"scope": "Calendars.ReadWrite Contacts.ReadWrite",
"expires_in": "3599",
"ext_expires_in": "0",
"expires_on": "1493960906",
"not_before": "1493957006",
"resource": "https://outlook.office365.com/",
"access_token": "SOME_ACCESS_TOKEN_STRING",
}
{
"variables": [],
"info": {
"name": "GoDaddy Office365 copy",
"_postman_id": "546e1412-9ba2-9dfc-bfba-5f1f04046080",
"description": "",
"schema": "https://schema.getpostman.com/json/collection/v2.0.0/collection.json"
},
"item": [
{
class Library < ActiveRecord::Base
has_many :books, dependent: :destroy
end
class Book < ActiveRecord::Base
belongs_to :library, touch: :true
end
@drunkel
drunkel / sublime.markdown
Last active November 27, 2020 05:09
Sublime 3 setup

Getting Setup with Sublime Text (3)

  1. Download here: http://www.sublimetext.com/
  2. Copy into /Applications (OSX, install however your OS wants you to)
  3. Add symlink so you can launch sublime from the command line using 'sublime'

ln -s "/Applications/Sublime Text.app/Contents/SharedSupport/bin/subl" /usr/local/bin/sublime

Launch Sublime! > sublime .

@drunkel
drunkel / MorseMapping.java
Last active February 10, 2016 07:33
Morse code mapping from character to pattern string in java (because nobody should ever have to type this out again)
public class MorseMapping {
public static final Map<Character, String> MORSE_MAPPING;
static {
MORSE_MAPPING = new HashMap<>();
MORSE_MAPPING.put('A', ".-");
MORSE_MAPPING.put('B', "-...");
MORSE_MAPPING.put('C', "-.-.");
MORSE_MAPPING.put('D', "-..");
MORSE_MAPPING.put('E', ".");
@drunkel
drunkel / .rubocop.yml
Last active April 6, 2017 00:19
Rubcop config
Documentation:
# Don't complain about lack of documentation
Enabled: false
Metrics/AbcSize:
# Don't analyze Active Branch Condition size
Enabled: false
Metrics/ClassLength:
# Message: Class definition is too long
@drunkel
drunkel / Things I Forget
Last active August 29, 2015 14:21
Things I always forget:
#Execute a script in rails console
load './path/to/foo.rb'
#Stub constants in a file. Gotta put in quotes, because rails.
before :each do
stub_const('MyClass::FOO_CONSANT', some_value)
end
#Clean branches on remote that are merged to master
git branch --merged | grep -v "\*" | xargs -n 1 git branch -d #Run from master, or like, delete all your stuff