This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
talking_points = [ | |
{ | |
"Position": 1, | |
"category": "Recommended (Fenergo)", | |
"talking_point": "Collaboration - How often do you share feedback with your colleagues?", | |
"talking_point_type": "everyone" | |
}, | |
{ | |
"Position": 1, | |
"category": "Recommended (Fenergo)", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
e = Employee.find(id) | |
ooo_cal_ids = OneOnOne.where('reportee_id = ? OR manager_id = ? OR creator_id = ?', e.id, e.id, e.id).where('start_time > ?',Time.now.beginning_of_day).where('start_time < ?', 40.days.from_now).where('cal_id is not null').order('start_time asc').map(&:cal_id) | |
calendar_event_cal_ids = CalendarEvent.where('start_time > ?',Time.now).where(manager: e).map(&:cal_event_id) | |
@service = Google::Apis::CalendarV3::CalendarService.new | |
@service.authorization = e.user.token.google_secret.to_authorization | |
token = e.user.google_token | |
new_access_token = @service.authorization.refresh! | |
token.access_token = new_access_token['access_token'] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[ | |
{ | |
"author": "First Author", | |
"content": "First Quote." | |
}, | |
{ | |
"author": "Second Author", | |
"content": "Second Quote." | |
} | |
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Asker < ActiveRecord::Base | |
has_many :questions | |
belongs_to :user | |
accepts_nested_attributes_for :user | |
end |
Install ScriptListener Plugin plugin
You'd find logs in ScriptingListenerJS.log like this
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
fs = require 'fs' | |
path = require 'path' | |
PSD = require './psd.js/src/psd' | |
Parser = require './psd.js/src/parser' | |
psd = PSD.fromFile process.argv[2] | |
psd.parse() | |
for layer in psd["layerMask"]["layers"] | |
if layer["adjustments"].hasOwnProperty "solid_fill" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /usr/bin/ruby | |
## | |
# == remember: | |
# * insert your login and password at Line 100, and save this file. | |
# * of couse, be very carefull if you send this to a friend... REMOVE your credentials first! | |
# * if you are using Google Hosted for your Domain (Google Apps), your_login is something like: [email protected] | |
# * example: go = GoGmail.new($*[0], 'imap.gmail.com', 993, $*[1], '[email protected]', 'littlebird', $*[2]) | |
# | |
# == usage: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
➜ dukerson.github.io git:(master) jekyll --server | |
/Users/alagu/.rvm/rubies/ruby-1.9.3-p374/lib/ruby/1.9.1/psych.rb:203:in `parse': (/Users/alagu/Code/blog/dukerson.github.io/_config.yml): found unexpected ':' while scanning a plain scalar at line 11 column 10 (Psych::SyntaxError) | |
from /Users/alagu/.rvm/rubies/ruby-1.9.3-p374/lib/ruby/1.9.1/psych.rb:203:in `parse_stream' | |
from /Users/alagu/.rvm/rubies/ruby-1.9.3-p374/lib/ruby/1.9.1/psych.rb:151:in `parse' | |
from /Users/alagu/.rvm/rubies/ruby-1.9.3-p374/lib/ruby/1.9.1/psych.rb:127:in `load' | |
from /Users/alagu/.rvm/rubies/ruby-1.9.3-p374/lib/ruby/1.9.1/psych.rb:297:in `block in load_file' | |
from /Users/alagu/.rvm/rubies/ruby-1.9.3-p374/lib/ruby/1.9.1/psych.rb:297:in `open' | |
from /Users/alagu/.rvm/rubies/ruby-1.9.3-p374/lib/ruby/1.9.1/psych.rb:297:in `load_file' | |
from /Users/alagu/.rvm/rubies/ruby-1.9.3-p374/lib/ruby/gems/1.9.1/gems/jekyll-0.12.1/lib/jekyll.rb:130:in `configuration' | |
from /Users/alagu/.rvm/rubies/ruby-1.9.3-p374/lib/ruby/gems/1.9.1/gems/jekyll-0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[14] irb(main)> k = {:i => 1} | |
=> {:i=>1} | |
[15] irb(main)> n[k] = 5 | |
=> 5 | |
[16] irb(main)> n | |
=> {{:i=>1}=>5} |
NewerOlder