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
FROM alpine:latest | |
RUN apk add --update --no-cache ruby -y | |
ADD scraper.rb . | |
CMD ["ruby", "scraper.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
#!/usr/bin/sudo ruby | |
# | |
# revealer.rb -- Deobfuscate GHE .rb files. | |
# | |
# This is simple: | |
# Every obfuscated file in the GHE VM contains the following code: | |
# | |
# > require "ruby_concealer.so" | |
# > __ruby_concealer__ "..." |
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
begin | |
require 'bundler/inline' | |
require 'bundler' | |
rescue LoadError => e | |
STDERR.puts 'Bundler version 1.10 or later is required. Please update your Bundler' | |
raise e | |
end | |
gemfile(true, ui: ENV['SILENT'] ? Bundler::UI::Silent.new : Bundler::UI::Shell.new) do | |
source 'https://rubygems.org' |
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
begin | |
require 'bundler/inline' | |
require 'bundler' | |
rescue LoadError => e | |
STDERR.puts 'Bundler version 1.10 or later is required. Please update your Bundler' | |
raise e | |
end | |
gemfile(true, ui: ENV['SILENT'] ? Bundler::UI::Silent.new : Bundler::UI::Shell.new) do | |
source 'https://rubygems.org' |
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
#!/bin/bash | |
if [ -z `which say` ]; then | |
echo Aww, no fun :-\( | |
exit 1 | |
fi | |
while [ true ]; do | |
say never gonna give you up | |
say never gonna let you down | |
say never gonna run around and desert you |
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
#!/bin/bash | |
sudo fallocate -l 2G /swapfile # <-- Don't forget to change size here | |
sudo chmod 600 /swapfile | |
sudo mkswap /swapfile | |
sudo swapon /swapfile | |
sudo echo '/swapfile none swap sw 0 0' >> /etc/fstab | |
sudo sysctl vm.swappiness=10 | |
sudo sysctl vm.vfs_cache_pressure=50 | |
sudo echo 'vm.swappiness=10' >> /etc/sysctl.conf |
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 'httparty' | |
class Plaid | |
class << self | |
def connect(username, password, institution, options = {}) | |
# Login only unless otherwise specified | |
options[:login_only] ||= true | |
options[:webhook] ||= ENV['PLAID_WEBHOOK_URL'] if ENV['PLAID_WEBHOOK_URL'] |
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.Mixin.create({ | |
attributeBindings: ['data-original-title', 'data-toggle', 'data-placement'], | |
classNameBindings: ['hasError:has-warning'], | |
record: null, | |
property: null, | |
cacheBust: false, | |
/* |
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
/* Make sure you set a dimension, or the SVG will attempt to fill all available space! */ | |
svg { | |
width: 64px; | |
height: 64px; | |
} | |
/* all of our SVG images have a .svg-main class so we can change their base colors predictably */ | |
svg .svg-main { | |
fill: white; | |
} |
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
//Note: this example assumes jQuery is available on your site. | |
Retina = function() { | |
return { | |
init: function(){ | |
//Get pixel ratio and perform retina replacement | |
//Optionally, you may also check a cookie to see if the user has opted out of (or in to) retina support | |
var pixelRatio = !!window.devicePixelRatio ? window.devicePixelRatio : 1; | |
if (pixelRatio > 1) { | |
$("img").each(function(idx, el){ | |
el = $(el); |
NewerOlder