Skip to content

Instantly share code, notes, and snippets.

🤙

Dan Sullivan deepeeess

🤙
Block or report user

Report or block deepeeess

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@LeZuse
LeZuse / stats_logger.rb
Last active Oct 4, 2019
Puma plugin for stats logging on Heroku
View stats_logger.rb
Puma::Plugin.create do
def production?
ENV.fetch('RACK_ENV', 'development') == 'production'
end
def log(msg)
if production?
Rails.logger.info msg
else
puts msg
@EricADockery
EricADockery / Fastfile
Created Jul 25, 2017
Parallel iOS Testing using Bluepill
View Fastfile
lane :bluepill do
scan(scheme: “myApp”, build_for_testing: true)
sh “bash ./bluepill.sh“
end
@jicowan
jicowan / enable-mfa-delete.py
Created Jul 14, 2017
enable mfa-delete on a bucket
View enable-mfa-delete.py
import boto3
from botocore.exceptions import ClientError
s3_client = boto3.client('s3')
s3_bucket = boto3.resource('s3')
bucket_name = raw_input('Enter the name of the bucket that you want to enable MFA-delete on: ')
mfa_token = raw_input('Enter your MFA serial number and token code, e.g. <deviceSerialNumber> <tokenCode>: ')
try:
s3_bucket.meta.client.head_bucket(Bucket=bucket_name)
@carolineartz
carolineartz / _ex.md
Last active Feb 27, 2018
example testing out `ActiveRecord::Aggregations`
View _ex.md

Usage

# in your controller you can use
@domain = CreateDomains.new('car.oline.codes').call #=> returns Domain with name 'car' that is the child of `oline.codes`
@domain.web_address.to_s #=> 'car.oline.codes'

You can use your logic for subtree equality to compare the actual web_address value objects, which are immutable. You could also see all the 'parent' strings for a given web_address object

@thatbudakguy
thatbudakguy / hostapd.conf
Last active Oct 30, 2018
hostapd configuration for a 5ghz wireless network.
View hostapd.conf
interface=(INTERFACE HERE)
driver=nl80211
ssid=(SSID HERE)
hw_mode=a
channel=36
country_code=US
ignore_broadcast_ssid=0
wpa=2
@penguinpowernz
penguinpowernz / README.md
Last active Jul 12, 2019
WPA CLI commands
View README.md
command args description
status [verbose] get current WPA/EAPOL/EAP status
ifname get current interface name
ping pings wpa_supplicant
relog re-open log-file (allow rolling logs)
note <text> add a note to wpa_supplicant debug log
mib get MIB variables (dot1x, dot11)
help [command] show usage help
interface [ifname] show interfaces/select interface
@ajaxray
ajaxray / select2-cascade.js
Last active Nov 7, 2019
Making Select2 (4.x) list boxes cascading / dependent. Options of a select2 list box will be loaded/refreshed by ajax based on selection of another select2 list box.
View select2-cascade.js
/**
* A Javascript module to loadeding/refreshing options of a select2 list box using ajax based on selection of another select2 list box.
*
* @url : https://gist.github.com/ajaxray/187e7c9a00666a7ffff52a8a69b8bf31
* @auther : Anis Uddin Ahmad <anis.programmer@gmail.com>
*
* Live demo - https://codepen.io/ajaxray/full/oBPbQe/
* w: http://ajaxray.com | t: @ajaxray
*/
var Select2Cascade = ( function(window, $) {
@chrisjhoughton
chrisjhoughton / README.md
Last active Apr 16, 2019
Notify tray workflows "webhook style" from Salesforce using Apex triggers.
View README.md

Salesforce Apex trigger notifications for tray.io

Salesforce's Apex triggers allow you to trigger tray workflows in real-time, based on events that occur in Salesforce. Events include things like:

  • New lead creations
  • Opportunity updates, such as the status moving from "open" to "closed"

Salesforce doesn't support webhooks out of the box, so we'll need to add some Apex code to your Salesforce account to notify tray at the right time.

@alces
alces / ansible_local_playbooks.md
Last active Nov 12, 2019
How to run an Ansible playbook locally
View ansible_local_playbooks.md
  • using Ansible command line:
ansible-playbook --connection=local 127.0.0.1 playbook.yml
  • using inventory:
127.0.0.1 ansible_connection=local
View Events in select2 [jQuery]
<html>
<head>
<script src="http://code.jquery.com/jquery-1.10.2.min.js"></script>
<script src="select2.js"></script>
<script>
$(function(){
// display logs
function log(text) {
You can’t perform that action at this time.