Data from [https://snowflake.medium.com/]
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
countChar = function(str, ch) { | |
let count = 0; | |
for (let i = 0; i < str.length; i++) { | |
if (str[i] == ch) { | |
count++; | |
} |
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
import Ember from 'ember'; | |
export default Ember.Controller.extend({ | |
appName: 'Ember Twiddle', | |
model() { | |
let plan = store.createRecord('plan'); | |
let m1 = store.createRecord('milestone'); | |
let m2 = store.createRecord('milestone'); | |
plan.get('milestones').pushObject(m1); |
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
import Ember from 'ember'; | |
export default Ember.Controller.extend({ | |
appName: 'Ember Twiddle' | |
}); |
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
import Ember from 'ember'; | |
export default Ember.Component.extend({ | |
didReceiveAttrs() { | |
// Here is where I want to focus the new input, but commenting in this next line result in | |
// `cannot read property 'focus' of undefined` | |
//this.$().focus(); | |
} | |
}); |
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
import Ember from 'ember'; | |
export default Ember.Component.extend({ | |
}); |
I hereby claim:
- I am gar on github.
- I am gar (https://keybase.io/gar) on keybase.
- I have a public key whose fingerprint is A544 805B 8BF9 80CF 11B1 01AD 546E 98D6 D6EF 1885
To claim this, I am signing this object:
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
(ns luhn) | |
(defn last-digit [n] | |
(mod n 10)) | |
(defn drop-last-digit [n] | |
(long (/ n 10))) | |
(defn to-rev-digits | |
([n] (to-rev-digits n [])) |
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
13.591438 seconds on ruby 2.1.1p76 (2014-02-24 revision 45161) [x86_64-linux] | |
6.887000 seconds on jruby 1.7.12 (1.9.3p392) 2014-04-15 643e292 on OpenJDK 64-Bit Server VM 1.7.0_55-b14 [linux-amd64] | |
24.593889 seconds on rubinius 2.2.6 (2.1.0 68d916a5 2014-03-10 JI) [x86_64-linux-gnu] |
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
$ pwd | |
/Users/gar/code/chef-repo | |
$ knife client list | |
tangleofwire-validator | |
$ diff client-config/validation.pem /etc/chef/validation.pem | |
$ diff client-config/validation.pem .chef/tangleofwire-validator.pem | |
$ sudo chef-client | |
[2012-08-11T12:05:26+01:00] INFO: *** Chef 10.12.0 *** | |
[2012-08-11T12:05:28+01:00] INFO: Client key /etc/chef/client.pem is not present - registering | |
[2012-08-11T12:05:29+01:00] INFO: HTTP Request Returned 403 Forbidden: Merb::ControllerExceptions::Forbidden |
NewerOlder