Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

View skyl's full-sized avatar

Skylar Saveland skyl

View GitHub Profile
@moklett
moklett / openconnect.md
Created July 24, 2012 15:21
OpenConnect VPN on Mac OS X

Unfortunately, the Cisco AnyConnect client for Mac conflicts with Pow. And by "conflicts", I mean it causes a grey-screen-of-death kernel panic anytime you connect to the VPN and Pow is installed.

As an alternative, there is OpenConnect, a command-line client for Cisco's AnyConnect SSL VPN.

Here's how to get it set up on Mac OS X:

  1. OpenConnect can be installed via homebrew:

     brew update
    

brew install openconnect

@crgimenes
crgimenes / stringToReaderCloser.go
Last active April 11, 2024 15:41
string to io.ReadCloser
package main
import (
"bytes"
"fmt"
"io"
"os"
"strings"
)
@iamatypeofwalrus
iamatypeofwalrus / roll_ipython_in_aws.md
Last active January 22, 2024 11:18
Create an iPython HTML Notebook on Amazon's AWS Free Tier from scratch.

What

Roll your own iPython Notebook server with Amazon Web Services (EC2) using their Free Tier.

What are we using? What do you need?

  • An active AWS account. First time sign-ups are eligible for the free tier for a year
  • One Micro Tier EC2 Instance
  • With AWS we will use the stock Ubuntu Server AMI and customize it.
  • Anaconda for Python.
  • Coffee/Beer/Time
@jashkenas
jashkenas / semantic-pedantic.md
Last active November 29, 2023 14:49
Why Semantic Versioning Isn't

Spurred by recent events (https://news.ycombinator.com/item?id=8244700), this is a quick set of jotted-down thoughts about the state of "Semantic" Versioning, and why we should be fighting the good fight against it.

For a long time in the history of software, version numbers indicated the relative progress and change in a given piece of software. A major release (1.x.x) was major, a minor release (x.1.x) was minor, and a patch release was just a small patch. You could evaluate a given piece of software by name + version, and get a feeling for how far away version 2.0.1 was from version 2.8.0.

But Semantic Versioning (henceforth, SemVer), as specified at http://semver.org/, changes this to prioritize a mechanistic understanding of a codebase over a human one. Any "breaking" change to the software must be accompanied with a new major version number. It's alright for robots, but bad for us.

SemVer tries to compress a huge amount of information — the nature of the change, the percentage of users that wil

@evildmp
evildmp / gist:3094281
Last active June 30, 2023 10:55
Set up Django, nginx and uwsgi

This document has now been incorporated into the uWSGI documentation:

http://uwsgi-docs.readthedocs.org/en/latest/tutorials/Django_and_nginx.html

Set up Django, nginx and uwsgi

Steps with explanations to set up a server using:

@joaoferrao
joaoferrao / caws.go
Last active February 12, 2023 15:47
AWS Resource Crawler
package main
import (
"fmt"
"github.com/aws/aws-sdk-go/aws"
"github.com/aws/aws-sdk-go/aws/session"
"github.com/aws/aws-sdk-go/service/resourcegroupstaggingapi"
"github.com/olekukonko/tablewriter"
"os"
"strings"
@guillaumepiot
guillaumepiot / gist:3939452
Created October 23, 2012 15:28
ANGULARJS - Django CSRF Token header setup
var myApp = angular.module('myApp').config(function($httpProvider) {
$httpProvider.defaults.headers.post['X-CSRFToken'] = $('input[name=csrfmiddlewaretoken]').val();
});
@kayzhu
kayzhu / csrf.js
Last active September 27, 2016 10:11
Send POST request in Angular.js to a CSRF-protected Django view
<script type="text/javascript" src="/angular/angular.js"></script>
<script type="text/javascript" src="/angular/angular-cookies.min.js"></script>
// app.js
// inject ngCookies to your app named 'myApp'.
angular.module('myApp', ['ngCookies']);
// controller.js
function MyCtrl($scope, $http, $cookies) {
@jezdez
jezdez / pip.conf
Created March 10, 2010 14:57
My ~/.pip/pip.conf. More information here: http://pip.openplans.org/configuration.html
[global]
default-timeout = 60
respect-virtualenv = true
download-cache = ~/.pip/cache
log-file = ~/.pip/pip.log
build = ~/.pip/build
[install]
use-mirrors = true
@jeremyjbowers
jeremyjbowers / my_app.conf
Created December 31, 2012 01:29
This is an upstart configuration file to execute uWSGI as a daemon on Ubuntu-recent (10.x, 12.x). For more info on upstart: http://upstart.ubuntu.com/getting-started.html. This file would live in /etc/init/ and you'd need to do sudo initctl reload-configuration on the initial file creation and then sudo service my_app start/restart/stop to contr…
description "uWSGI server for electris CMS"
start on runlevel [2345] # start on all runlevels.
stop on runlevel [!2345] # stop when shutting down.
respawn # respawn if job crashes or is stopped ungracefully.
env DEPLOYMENT_TARGET=production # set any environment variables you like here.
env DJANGO_SETTINGS_FILE=conf/settings.py # more environment variables if you like.
env PYTHONPATH=/home/ubuntu/apps/my_app:/home/ubuntu/.virtualenv/my_app