Skip to content

Instantly share code, notes, and snippets.

View alexbilbie's full-sized avatar
👋

Alex Bilbie alexbilbie

👋
View GitHub Profile
anonymous
anonymous / gist:251218cc1cbb59171810
Created May 19, 2014 14:19
Internet Domains of Recruitment Companies to Inform a Blocked-Sender Email Policy
The following recruitment companies have used underhanded or dishonest methods to make contact since 01 Jan 2014. It serves as the foundation of an domain-blacklist on our email servers.
gravitasrecruitmentgroup.com
g2recruitment.com
axica-recruitment.com
gcsltd.com
bridgenoble.com
mint-rs.com
profectusrecruitment.co.uk
osrecruit.com

###Edit this file

/etc/nginx/nginx.conf

###Add this line anywhere inside the http { } block:

ssl_protocols TLSv1 TLSv1.1 TLSv1.2;

###Go to your Forge panel and restart Nginx

@mbostock
mbostock / .block
Last active April 20, 2016 19:00
Map Pan & Zoom I
license: gpl-3.0
@drewwells
drewwells / org.golang.doc.example.plist
Created March 26, 2015 16:07
Local godoc server for private packages. You will need to build the search index (periodically) to use search functionality.
?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC -//Apple Computer//DTD PLIST 1.0//EN
http://www.apple.com/DTDs/PropertyList-1.0.dtd >
<plist version="1.0">
<dict>
<key>EnvironmentVariables</key>
<dict>
<key>GOPATH</key>
<string>{YOUR GOPATH}</string>
<key>GOROOT</key>
import { Component } from 'react'
import { createStore, combineReducers } from 'redux'
import parseLinkHeader from 'parse-link-header'
const START = 'start'
const SUCCEED = 'succeed'
const ERROR = 'error'
const inflight = (state={}, action) => (
((state) => (
@paulirish
paulirish / gist:366184
Created April 14, 2010 18:59
html5 geolocation with fallback.
// geo-location shim
// currentely only serves lat/long
// depends on jQuery
// doublecheck the ClientLocation results because it may returning null results
;(function(geolocation){
if (geolocation) return;
@ThisIsMissEm
ThisIsMissEm / handler.js
Created November 25, 2014 18:53
The better way to execute Go on Amazon Lambda (see: http://blog.0x82.com/2014/11/24/aws-lambda-functions-in-go/)
var child_process = require('child_process');
exports.handler = function(event, context) {
var proc = spawn('./test', [ JSON.stringify(event) ], { stdio: 'inherit' });
proc.on('close', function(code){
if(code !== 0) {
return context.done(new Error("Process exited with non-zero status code"));
}
@Thinkscape
Thinkscape / PSR-0-final-proposal.md
Created September 22, 2011 10:30
PSR-0 Final Proposal (PHP Standards Working Group)

PSR-0 Final Proposal (PHP Standards Working Group)

The following describes the mandatory requirements that must be adhered to for autoloader interoperability.

Mandatory:

  • A fully-qualified namespace and class must have the following structure \ <Vendor Name> \ (<Namespace>)* \ <Class Name>
  • Each namespace must have a top-level namespace ("Vendor Name").
  • Each namespace can have as many sub-namespaces as it wishes.
  • Each namespace separator is converted to a DIRECTORY_SEPARATOR when loading from the file system.
  • Each "_" character in the CLASS NAME is converted to a DIRECTORY_SEPARATOR. The "_" character has no special meaning in the namespace.
@astrikos
astrikos / stale_security_groups.py
Created November 9, 2017 15:52
Script to detect stale AWS security groups
#!/usr/bin/env python
import boto3
import argparse
class StaleSGDetector(object):
"""
Class to hold the logic for detecting AWS security groups that are stale.
"""
def __init__(self, **kwargs):
@aerostitch
aerostitch / aws_cleanup_cloudwatch.go
Last active April 28, 2021 17:47
Delete empty log streams or logs streams that have only elements older than 30 days in it
package main
// This script cleans up old LogGroups (empty and olde than 90 days and old
// LogStreams (last event timestamp is over 30 days old or if the logstream
// is empty and has been created over 30 days ago) from AWS Cloudwatch
import (
"github.com/aws/aws-sdk-go/aws/session"
"github.com/aws/aws-sdk-go/service/cloudwatchlogs"
"log"