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
openssl rand -base64 512 > .chef/encrypted_data_bag_secret | |
echo 'encrypted_data_bag_secret "#{current_dir}/encrypted_data_bag_secret"' >> .chef/knife.rb | |
# knife bootstrap myhost -x user -N node-name -r 'role[somerole]' --sudo |
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
# spec/spec_helper.rb | |
RSpec.configure do |config| | |
config.before(:each) do | |
if Capybara.current_driver == :poltergeist | |
page.driver.headers = { 'Accept-Language' => "en" } | |
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
echo "cookbook 'ssh_known_hosts', github: 'opscode-cookbooks/ssh_known_hosts'" >> Berksfile | |
berks install | |
berks upload | |
knife data bag create ssh_known_hosts | |
knife data bag from file ssh_known_hosts data_bags/ssh_known_hosts/github.json | |
knife data bag from file ssh_known_hosts data_bags/ssh_known_hosts/heroku.json | |
knife role from file roles/jenkins-slave.rb |
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
# Gemfile | |
group :test do | |
gem "webmock" | |
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
# LABEL was passed from an upstream job. It will be in 0, 1 or 2. | |
find ./spec -name "*_spec.rb" | awk "NR % 3 == ${LABEL} {print}" | xargs rspec |
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
public class MyStringRequest extends StringRequest{ | |
public MyStringRequest(int method, String url, Response.Listener<String> listener, Response.ErrorListener errorListener) { | |
super(method, url, listener, errorListener); | |
} | |
@Override | |
public void deliverError(VolleyError error) { | |
if (error instanceof NoConnectionError) { | |
Cache.Entry entry = this.getCacheEntry(); | |
if(entry != null) { |
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
echo y | ${ANDROID_HOME}/tools/android update sdk -u -a -t platform-tools,build-tools-18.0.1 |
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
{ | |
"email": "[email protected]", | |
"email_verified": true, | |
"family_name": "Sosa", | |
"gender": "male", | |
"given_name": "Akira", | |
"hd": "gmail.com", | |
"locale": "en", | |
"name": "Akira Sosa", | |
"picture": "https://lh3.googleusercontent.com/path/to/photo.jpg", |
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 numpy as np | |
from keras.layers import Dense, Dropout, Activation | |
from keras.layers.advanced_activations import PReLU | |
from keras.models import Sequential | |
from matplotlib import pyplot as plt | |
seed = 7 | |
np.random.seed(seed) | |
num_digits = 14 # binary encode numbers |
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 time | |
import numpy as np | |
from keras import Input | |
from keras.applications.mobilenet import DepthwiseConv2D | |
from keras.engine import Model | |
from keras.layers import Conv2D | |
batch_num = 16 |
OlderNewer