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
Braintree Hosted Fields - Card Type detection | |
---------------------------------------------- | |
In this demo I tried to recreate the Braintree v.zero dropin experience of auto matically detecting the credit card type using the Hosted Field SDK. | |
A [Pen](http://codepen.io/cbetta/pen/XbEpGx) by [Cristiano Betta](http://codepen.io/cbetta) on [CodePen](http://codepen.io/). | |
[License](http://codepen.io/cbetta/pen/XbEpGx/license). |
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
### Keybase proof | |
I hereby claim: | |
* I am cbetta on github. | |
* I am cbetta (https://keybase.io/cbetta) on keybase. | |
* I have a public key whose fingerprint is D518 8567 0820 1705 14A5 97C2 25D1 7CB7 AD85 AA59 | |
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
dokku help | |
> backup:export [file] Export dokku configuration files | |
> backup:import [file] Import dokku configuration files | |
> config display the config vars for an app | |
> config:get KEY display a config value for an app | |
> config:set KEY1=VALUE1 [KEY2=VALUE2 ...] set one or more config vars | |
> config:unset KEY1 [KEY2 ...] unset one or more config vars | |
> delete Delete an application | |
> help Print the list of commands | |
> logs [-t] Show the last logs for an application (-t follows) |
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
git push dokku master | |
> Counting objects: 4, done. | |
> Delta compression using up to 8 threads. | |
> Compressing objects: 100% (2/2), done. | |
> Writing objects: 100% (3/3), 307 bytes | 0 bytes/s, done. | |
> Total 3 (delta 1), reused 0 (delta 0) | |
> -----> Cleaning up ... | |
> remote: Cloning into '/tmp/tmp.mTjJcRME5f'... | |
> -----> Building node-js-sample ... | |
> remote: done. |
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
cd node-js-sample | |
dokkufy app | |
> Server hostname or IP: ppd.io | |
> Dokku username on server [dokku]: | |
> Using dokku@ppd.io:node-js-sample | |
> Setting git remote | |
> Writing .dokkurc | |
> You can now push your app using `git push dokku master` |
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
dokkufy server | |
> Server hostname or IP: ppd.io | |
> Username on server: cbetta | |
> Desired root domain (e.g. example.com): ppd.io | |
> ... |
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 A | |
def self.foo val | |
define_method "foo" do | |
val | |
end | |
end | |
end |
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
def valid_login(token = '') | |
interactable = Interaction.where(interactable_type: 'Ticket', key: 'wristband', value: token) | |
ticket = Ticket.find(interactable(:interactable_id)) | |
end |
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
stage { 'preinstall': | |
before => Stage['main'] | |
} | |
class apt_get_update { | |
exec { 'apt-get -y update': } | |
} | |
class { 'apt_get_update': | |
stage => preinstall |
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
require 'bloomfilter' | |
bf = BloomFilter.new({ 'bits' => 0xff, 'salts' => %w(z A) }) | |
bf.add("foo") | |
bf.test("foo") | |
#=> true | |
bf.to_json |