Skip to content

Instantly share code, notes, and snippets.

View jasherai's full-sized avatar

Pritesh jasherai

  • Phatforge
  • London
View GitHub Profile
@jasherai
jasherai / tinydkim.py
Created August 3, 2022 19:22 — forked from gwire/tinydkim.py
takes an RSA public key on stdin and outputs a tinydns / djbdns DKIM record
#!/usr/bin/env python
# tinydkim - takes an RSA public key on stdin and outputs a tinydns / djbdns DKIM record
#
# example: openssl rsa -in test.pem -pubout | ./tinydkim.py -s test -d foo.com
#
# TODO: add support for notes field?
#
# 2016 Lee Maguire

Keybase proof

I hereby claim:

  • I am jasherai on github.
  • I am jasherai (https://keybase.io/jasherai) on keybase.
  • I have a public key ASBWYCaBfaAxEP5uJwnsPqjsxkL5pKxbV0RMzOt3Evswpgo

To claim this, I am signing this object:

function check_up() {
service=$1
host=$2
port=$3
max=13 # 1 minute
counter=1
while true;do
python -c "import socket;s = socket.socket(socket.AF_INET, socket.SOCK_STREAM);s.connect(('$host', $port))" \
require 'chef/provisioning'
# with_chef_server Chef::Config[:chef_server_url], {
with_chef_server "https://api.opscode.com/organizations/XXXX", {
:client_name => Chef::Config[:node_name],
:signing_key_filename => Chef::Config[:client_key]
}
machine 'provisioner' do
redis_url = ENV.fetch('REDIS_URL')
Sidekiq.configure_server do |config|
config.redis = { url: "#{redis_url}/12", namespace: 'mr' }
end
Sidekiq.configure_client do |config|
config.redis = { url: "#{redis_url}/12", namespace: 'mr' }
end
http {
proxy_cache_path /var/cache/nginx levels=1:2 keys_zone=one:8m max_size=3000m inactive=600m;
proxy_temp_path /var/tmp;
include mime.types;
default_type application/octet-stream;
sendfile on;
keepalive_timeout 65;
gzip on;
gzip_comp_level 6;
@jasherai
jasherai / 0-readme.md
Last active December 10, 2015 00:39 — forked from burke/0-readme.md
Fork of burke's rbenv friendly falcon patching script which uses this as the default ruby version (i.e. no -perf suffix on the name)

ruby-1.9.3-p327 cumulative performance patch for rbenv

This installs a patched ruby 1.9.3-p327 with various performance improvements and a backported COW-friendly GC, all courtesy of funny-falcon.

Requirements

You will also need a C Compiler. If you're on Linux, you probably already have one or know how to install one. On OS X, you should install XCode, and brew install autoconf using homebrew.

Rails.application.routes.draw do
resources :contacts, :only => [:new, :create]
constraints(Subdomain) do
match '/' => "home#index"
devise_for :users
resources :users, :only => :show
end
end
Only in refine_rails/app/views/layouts: application.html.erb
Only in refine/app/views/layouts: application.html.erb.backup
Only in refine/app/views: sitemap
Only in refine: autotest
diff -ru refine_rails/config/application.rb refine/config/application.rb
--- refine_rails/config/application.rb 2011-09-03 16:27:37.262463871 +0100
+++ refine/config/application.rb 2011-09-03 16:24:03.601372171 +0100
@@ -1,6 +1,12 @@
require File.expand_path('../boot', __FILE__)
Only in refine_rails/app/views/layouts: application.html.erb
Only in refine/app/views/layouts: application.html.erb.backup
Only in refine/app/views: sitemap
Only in refine: autotest
diff -ru refine_rails/config/application.rb refine/config/application.rb
--- refine_rails/config/application.rb 2011-09-03 16:27:37.262463871 +0100
+++ refine/config/application.rb 2011-09-03 16:24:03.601372171 +0100
@@ -1,6 +1,12 @@
require File.expand_path('../boot', __FILE__)