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
(function() { | |
if (document.getElementsByClassName('show_more_backings')[0].offsetParent !== null) { | |
alert("You must click 'Show More Pledges' and load all your pledges before running this bookmarklet"); | |
return false; | |
}; | |
var collectData = function collectData() { | |
var nodes = $$('#collected .money'); | |
var ksData = [["Project", "Amount", "Currency", "Got It!"]]; | |
for (var i = 0; i < nodes.length; i++) { | |
var ksRow = []; |
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
location / { | |
if ($http_cf_visitor !~ https) { | |
rewrite ^(.*) https://$http_host$1 permanent; | |
} | |
} |
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 | |
export GOPATH=`pwd` | |
set -e | |
# grab and compile soruce code | |
go get github.com/sensu/uchiwa | |
cd $GOPATH/src/github.com/sensu/uchiwa | |
export VERSION=$(head -n 1 CHANGELOG.md | sed 's/#\+ \([0-9.]\+\).*/\1/g') |
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
# parses strings such as: 07-31 09:56:08 | |
DATESTAMP_CP [0-9]{2}-[0-9]{2} %{TIME} | |
# parses strings such as: '\u001b\[0m' or '^[[0m' or '\e[0m' | |
METACHAR_CP ((\\u001b|\^\[|\e)\[\d+m)? | |
# assigns regular expression that matches Java classes to a new variable name. | |
FACILITY_CP %{JAVACLASS} |
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
source 'https://rubygems.org' | |
gem 'youtube_it', '2.4.0' |
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 ( | |
"encoding/json" | |
"flag" | |
"fmt" | |
"io/ioutil" | |
"log" | |
"net/http" | |
"os" |
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/env ruby | |
# | |
# check-supervisor-socket | |
# | |
# | |
# DESCRIPTION: | |
# Check that all supervisor processes are running using its UNIX domain socket. See unix_http_server section in | |
# http://supervisord.org/configuration.html. | |
# | |
# OUTPUT: |
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
using System; | |
using Microsoft.VisualStudio.TestTools.UnitTesting; | |
using Moq; | |
namespace UnitTestStatic | |
{ | |
public class Utilities : IUtilities | |
{ | |
private static IUtilities _instance = new Utilities(); | |
private Utilities() { } |
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
# cat /etc/nginx/conf.d/cloudflare.conf | |
# sh cloudflare_ips_nginx.sh > /etc/nginx/conf.d/cloudflare.conf && service nginx configtest && service nginx reload | |
echo "# Cloudflare" | |
for ip in $(curl -s https://www.cloudflare.com/ips-v4); do | |
echo "set_real_ip_from $ip;" | |
done | |
for ip in $(curl -s https://www.cloudflare.com/ips-v6); do | |
echo "set_real_ip_from $ip;" | |
done |
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 grails.converters.JSON | |
// Automatically generated. Make future change here. | |
definition( | |
name: "gavin_test_pushes", | |
namespace: "gavin", | |
author: "Gavin", | |
description: "Description goes here", | |
category: "Fun & Social", |