Skip to content

Instantly share code, notes, and snippets.

View rawsyntax's full-sized avatar

Eric Himmelreich rawsyntax

View GitHub Profile
#!/bin/bash
# Installs the XCode command line tools if you don't have them
xcode-select --install
# Installs brew if you don't have it
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
# Makes your account the owner of /usr/local, which is preferred on single user Macs
sudo chown -R `whoami` /usr/local
# Installs all the dependencies for building libtorrent and rtorrent
brew install automake libtool boost curl lzlib libsigc++ openssl pkg-config xmlrpc-c
# Uninstall libtorrent-rasterbar if you already have it
@RobinDaugherty
RobinDaugherty / apply_this.sh
Last active December 7, 2018 12:45
Fix Pow's nack so that better_errors works on ruby 2.1+
curl -L https://gist.githubusercontent.com/RobinDaugherty/2731f20d303e6506d451384df2189210/raw/b52e6231170b3dce39633db29634dc892751910f/pow_better_errors_fix.patch |
patch ~/Library/Application\ Support/Pow/Versions/0.5.0/node_modules/nack/lib/nack/server.rb
@ashee
ashee / awsips-dnsmasq.md
Last active May 19, 2022 07:19
dnsmasq in osx (macSierra) to resolve aws internal ip's

AWS internal ip's

EMR has components running on internal ip's such as ip-172-23-53-101.ec2.internal. To resolve to the implied public/vpn IP's, setup dnsmasq

Setup dnsmasq

$ brew install dnsmasq

Configure dnsmasq

@sofaking
sofaking / jenkins_csp.md
Last active February 26, 2020 14:16
How to relax default Content Security Policy for Jenkins

By default Content Security Policy (CSP) in Jenkins does not allow Cucumber HTML reports to be shown correctly, with styles, embedded images and JS. To fix that one need to relax CSP rules.

In my case, Jenkins is hosted on Ubuntu, so config file is here: /etc/default/jenkins.
CSP settings should be passed via JAVA_ARGS. Just add the following next to your current JAVA_ARGS settings and then restart Jenkins.

JAVA_ARGS="$JAVA_ARGS -Dhudson.model.DirectoryBrowserSupport.CSP=\"sandbox allow-scripts; default-src 'unsafe-inline'; img-src *\""

To be fair, img-src * shouldn't be necessary, because obviously I'm hosting embedded images next to report itself.
But for some reason img-src 'self' didn't work for me. At least for Safari.

@p3t3r67x0
p3t3r67x0 / openssl_commands.md
Last active May 22, 2024 02:19
Some list of openssl commands for check and verify your keys

openssl

Install

Install the OpenSSL on Debian based systems

sudo apt-get install openssl
@w3irdrobot
w3irdrobot / kinesis.py
Last active February 4, 2022 15:02
Reading Data From Kinesis
from datetime import datetime, timedelta
import json
import boto
def get_kinesis_data_iterator(stream_name, minutes_running):
# Connect to Kinesis
kinesis = boto.connect_kinesis()
# Get data about Kinesis stream for Tag Monitor
kinesis_stream = kinesis.describe_stream(stream_name)
@Geesu
Geesu / assets.rake
Created December 8, 2014 16:55
Disable asset precompilation on heroku
Rake::Task["assets:precompile"].clear
namespace :assets do
task 'precompile' do
puts "Not pre-compiling assets..."
end
end
@rubencaro
rubencaro / install_elixir.md
Last active September 30, 2023 03:58
Elixir installation guide

Elixir installation guide

Version numbers should be the ones you want. Here I do it with the last ones available at the moment of writing.

The simplest way to install elixir is using your package manager. Sadly, at the time of writing only Fedora shows the intention to keep its packages up to date. There you can simply sudo dnf install erlang elixir and you are good to go.

Anyway, if you intend to work with several versions of erlang or elixir at the same time, or you are tied to a specific version, you will need to compile it yourself. Then asdf is your best friend.

@nquinlan
nquinlan / update_subuser_eventnotify_url.rb
Last active February 22, 2018 22:25
update subusers event notification url
# Runs through all of an Parent's subusers, and updates subusers Event Webhook to use a specified URL
# DOES NOT update Parent.
# Settings push call requires all settings to be defined. This script properly queries each account's settings, and sends them back, with the version updated only.
# Can easily be modified to set all subusers to particular settings.
#
# Requires:
# Credential for Parent account with API permission.
# Folder named 'logs' in same folder as script.
#
# v0.1, 13 Jun 2014, Nick @ SendGrid
@L422Y
L422Y / osx_automount_nfs.md
Last active May 10, 2024 09:06
Automounting NFS share in OS X into /Volumes

I have spent quite a bit of time figuring out automounts of NFS shares in OS X...

Somewhere along the line, Apple decided allowing mounts directly into /Volumes should not be possible:

/etc/auto_master (see last line):

#
# Automounter master map
#

+auto_master # Use directory service