Guiding frameworks
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 | |
# script to block tor nodes | |
# original credit for this goes to mikhailian: http://mikhailian.livejournal.com/48051.html | |
if [ "$(id -u)" != "0" ]; then | |
echo "This script must be run as root" 1>&2 | |
exit 1 | |
fi | |
if [ "${1}" == "" ]; then |
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
{ | |
".3dm": "x-world/x-3dmf", | |
".3dmf": "x-world/x-3dmf", | |
".a": "application/octet-stream", | |
".aab": "application/x-authorware-bin", | |
".aam": "application/x-authorware-map", | |
".aas": "application/x-authorware-seg", | |
".abc": "text/vnd.abc", | |
".acgi": "text/html", | |
".afl": "video/animaflex", |
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
package main | |
import ( | |
"flag" | |
"fmt" | |
"github.com/andybons/hipchat" | |
"log" | |
"os" | |
"path" | |
"strings" |
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
module Mongoid | |
module Unvalidate | |
extend ActiveSupport::Concern | |
module ClassMethods | |
# Removes specified validations from existing models for a given field | |
# | |
# @param [Symbol] field the field to remove validations from | |
# @param [Array<Symbol> | Symbol] validations validations to remove from field |
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
# https://github.com/mhenrixon/sidekiq-unique-jobs/issues/161 | |
# Even worse: https://github.com/mhenrixon/sidekiq-unique-jobs/issues/234 | |
class SidekiqUniqueJobsHashCompactor | |
include Sidekiq::Worker | |
sidekiq_options queue: "slow" | |
def perform | |
# Skip if there are jobs queued... | |
return unless Sidekiq::Queue.all.select { |q| q.size > 100 }.blank? |
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
INTRO | |
I get asked regularly for good resources on AWS security. This gist collects some of these resources (docs, blogs, talks, open source tools, etc.). Feel free to suggest and contribute. | |
Short Link: http://tiny.cc/awssecurity | |
Official AWS Security Resources | |
* Security Blog - http://blogs.aws.amazon.com/security/ | |
* Security Advisories - http://aws.amazon.com/security/security-bulletins/ | |
* Security Whitepaper (AWS Security Processes/Practices) - http://media.amazonwebservices.com/pdf/AWS_Security_Whitepaper.pdf | |
* Security Best Practices Whitepaper - http://media.amazonwebservices.com/AWS_Security_Best_Practices.pdf |
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 | |
# The "tmuxifier" | |
# Execute parallel processes in an arbitrary number of tmux panes | |
# This script requires the path to an existing script to | |
# execute in parallel. Optionally, the number of threads to | |
# and the name of the tmux session can be input. If threads | |
# and session name are not entered, threads are determined | |
# automatically and session names is set to a default. |
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 ActionDispatch::Routing::Mapper | |
def draw(routes_name) | |
instance_eval(File.read(Rails.root.join("config/routes/#{routes_name}.rb"))) | |
end | |
end | |
BCX::Application.routes.draw do | |
draw :api | |
draw :account | |
draw :session |
| Title | Description
OlderNewer