Skip to content

Instantly share code, notes, and snippets.

View sibartlett's full-sized avatar

Simon sibartlett

View GitHub Profile
@simme
simme / Install_tmux
Created October 19, 2011 07:55
Install and configure tmux on Mac OS X
# First install tmux
brew install tmux
# For mouse support (for switching panes and windows)
# Only needed if you are using Terminal.app (iTerm has mouse support)
Install http://www.culater.net/software/SIMBL/SIMBL.php
Then install https://bitheap.org/mouseterm/
# More on mouse support http://floriancrouzat.net/2010/07/run-tmux-with-mouse-support-in-mac-os-x-terminal-app/
@howarddierking
howarddierking / chainedBundleTransform.cs
Created March 8, 2012 03:20
example of a chained bundle transform using less
protected void Application_Start()
{
//...
Bundle cssBundle = new Bundle("~/Content/css", new LessTransform().Then(new CssMinify()));
cssBundle.AddFile("~/Content/site.css", throwIfNotExist: false);
cssBundle.AddDirectory("~/Content/", "jquery.mobile*", searchSubdirectories: false, throwIfNotExist: false);
BundleTable.Bundles.Add(cssBundle);
//...
@elena
elena / Basic MultiValueField MultiWidget
Created October 19, 2012 01:25
Super Basic Django MultiValueField / MutliWidget example
"""
An example of minimum requirements to make MultiValueField-MultiWidget for Django forms.
"""
import pickle
from django.http import HttpResponse
from django import forms
from django.template import Context, Template
from django.views.decorators.csrf import csrf_exempt
@synhershko
synhershko / CustomBootstraper.cs
Last active December 10, 2015 02:09
Custom NancyFX IViewLocationProvider implementation to allow for loading views from a RavenDB server instance. Views loaded from RavenDB will override views which exist on the File System.
protected override NancyInternalConfiguration InternalConfiguration
{
get
{
return NancyInternalConfiguration
.WithOverrides(x => x.ViewLocationProvider = typeof (RavenViewLocationProvider))
.WithIgnoredAssembly(asm => asm.FullName.StartsWith("RavenDB", StringComparison.InvariantCulture)); // or override ConfigureApplicationContainer to set AutoRegister to false
}
}
@markerikson
markerikson / appEntryPoint.js
Last active August 1, 2022 07:41
Webpack React/Redux Hot Module Reloading (HMR) example
import React from "react";
import ReactDOM from "react-dom";
import configureStore from "./store/configureStore";
const store = configureStore();
const rootEl = document.getElementById("root");
@jaredpalmer
jaredpalmer / Formik-Autosave.jsx
Last active December 29, 2022 01:22
Formik-Autosave
import React from 'react';
import PropTypes from 'prop-types'
import debounce from 'lodash.debounce' // or whatevs
import isEqual from 'lodash.isEqual'
class AutoSave extends React.Component {
static contextTypes = {
formik: PropTypes.object
}
@a7madgamal
a7madgamal / dark.md
Last active July 14, 2023 04:00
Dark mode for Slack on MacOS