Skip to content

Instantly share code, notes, and snippets.

View cheapwebmonkey's full-sized avatar
🏳️‍🌈
she/they. bi. INTJ. literal genius. I break things. #civictech #opendata

Margeaux Spring cheapwebmonkey

🏳️‍🌈
she/they. bi. INTJ. literal genius. I break things. #civictech #opendata
View GitHub Profile
@joho
joho / gist:3735740
Created September 17, 2012 05:40 — forked from rafaelss/gist:3700977
PostgreSQL 9.2 upgrade steps
Steps to install and run PostgreSQL 9.2 using Homebrew (Mac OS X)
(if you aren't using version 9.1.5, change line 6 with the correct version)
1. launchctl unload -w ~/Library/LaunchAgents/homebrew.mxcl.postgresql.plist
2. mv /usr/local/var/postgres /usr/local/var/postgres91
3. brew update
4. brew upgrade postgresql
5. initdb /usr/local/var/postgres -E utf8
6. pg_upgrade -b /usr/local/Cellar/postgresql/9.1.5/bin -B /usr/local/Cellar/postgresql/9.2.0/bin -d /usr/local/var/postgres91 -D /usr/local/var/postgres
7. cp /usr/local/Cellar/postgresql/9.2.0/homebrew.mxcl.postgresql.plist ~/Library/LaunchAgents/
@higepon
higepon / API.swift
Last active July 31, 2023 16:00
An example of JSON API call in Swift
//
// API.swift
//
// Created by Taro Minowa on 6/10/14.
// Copyright (c) 2014 Higepon Taro Minowa. All rights reserved.
//
import Foundation
typealias JSONDictionary = Dictionary<String, AnyObject>
@anthonyholmes
anthonyholmes / bootstrap-sass-mixin-cheatsheet.scss
Created October 10, 2014 08:13
Bootstrap Sass Mixin Cheatsheet
// Alerts
@include alert-variant($background, $border, $text-color);
// Background Variant
@include bg-variant($parent, $color);
// Border Radius
@include border-top-radius($radius);
@include border-right-radius($radius);
@include border-bottom-radius($radius);
{
"vars": {
"@gray-base": "#000",
"@gray-darker": "lighten(@gray-base, 13.5%)",
"@gray-dark": "lighten(@gray-base, 20%)",
"@gray": "lighten(@gray-base, 33.5%)",
"@gray-light": "lighten(@gray-base, 46.7%)",
"@gray-lighter": "lighten(@gray-base, 93.5%)",
"@brand-primary": "darken(#9b59b6, 6.5%)",
"@brand-success": "#27ae60",
@wpscholar
wpscholar / vagrant-cheat-sheet.md
Last active July 19, 2024 14:51
Vagrant Cheat Sheet

Typing vagrant from the command line will display a list of all available commands.

Be sure that you are in the same directory as the Vagrantfile when running these commands!

Creating a VM

  • vagrant init -- Initialize Vagrant with a Vagrantfile and ./.vagrant directory, using no specified base image. Before you can do vagrant up, you'll need to specify a base image in the Vagrantfile.
  • vagrant init <boxpath> -- Initialize Vagrant with a specific box. To find a box, go to the public Vagrant box catalog. When you find one you like, just replace it's name with boxpath. For example, vagrant init ubuntu/trusty64.

Starting a VM

  • vagrant up -- starts vagrant environment (also provisions only on the FIRST vagrant up)
anonymous
anonymous / index.html
Created July 13, 2016 12:07
flickr // source http://jsbin.com/hebomo
<!DOCTYPE html>
<html lang="en">
<head>
<meta name="description" content="flickr">
<meta charset="utf-8" />
<title></title>
<script src="http://cdn.kendostatic.com/2012.1.322/js/jquery.min.js" type="text/javascript"></script>
<script src="http://cdn.kendostatic.com/2012.1.322/js/kendo.web.min.js" type="text/javascript"></script>
<link href="http://cdn.kendostatic.com/2012.1.322/styles/kendo.common.min.css" rel="stylesheet" type="text/css" />
@brandonaaskov
brandonaaskov / alexa-oauth-example.js
Created August 19, 2016 17:48
Basic OAuth Example for Linking Accounts with an Alexa Skill
var express = require('express')
var router = express.Router()
var qs = require('qs')
function login (req, res) {
const query = qs.parse(req.query)
req.session.alexa = query // store the variables for the redirect URI after successful login
res.render('login')
}
@vishalkakadiya
vishalkakadiya / manage_columns_wp_admin.php
Last active March 16, 2024 01:08
Manage custom columns with sortable in WordPress Admin side
<?php
/*
* =================================================================================================
* Below both hooks works for custom post types.
* e.g. Suppose we have custom post-type name : Books
* @ref https://codex.wordpress.org/Plugin_API/Action_Reference/manage_$post_type_posts_custom_column
* =================================================================================================
*/