Skip to content

Instantly share code, notes, and snippets.

Jason Lewis canweriotnow

Block or report user

Report or block canweriotnow

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View Sample .NET Core + Npgsql
Sample .NET Core + Npgsql for RC2
1] Project.json
{
"buildOptions": {
"emitEntryPoint": true
},
"dependencies": {
"Npgsql": "3.1.0"
@kanaka
kanaka / gist:728961ce861c81a11bc6
Last active Aug 29, 2015
cljs-bootstrap crib sheet
View gist:728961ce861c81a11bc6
# Step-by-step distilled from: https://github.com/swannodette/cljs-bootstrap
git clone https://github.com/clojure/clojurescript
git clone https://github.com/swannodette/cljs-bootstrap
#git clone https://github.com/clojure/tools.reader
git clone https://github.com/swannodette/tools.reader
cd clojurescript/
./script/build
@Deraen
Deraen / components.clj
Last active Dec 15, 2019
Compojure-api with Component
View components.clj
(ns foobar.components
(:require [com.stuartsierra.component :as component]
[compojure.api.sweet :refer :all]))
(defmethod compojure.api.meta/restructure-param :components
[_ components acc]
(update-in acc [:letks] into [components `(::components ~'+compojure-api-request+)]))
(defn wrap-components [handler components]
(fn [req]
@kyledrake
kyledrake / ferengi-plan.txt
Last active Jan 11, 2020
How to throttle the FCC to dial up modem speeds on your website using Nginx
View ferengi-plan.txt
# The blog post that started it all: https://neocities.org/blog/the-fcc-is-now-rate-limited
#
# Current known FCC address ranges:
# https://news.ycombinator.com/item?id=7716915
#
# Confirm/locate FCC IP ranges with this: http://whois.arin.net/rest/net/NET-165-135-0-0-1/pft
#
# In your nginx.conf:
location / {
@webgio
webgio / app.coffee
Last active Mar 14, 2019
Marionette.js module to manage authentication. Needs a server method that checks credentials returning true or false. Started from this blog post code: http://clintberry.com/2012/backbone-js-apps-authentication-tutorial/
View app.coffee
App = new Marionette.Application();
App.addRegions {
"headerRegion": "#header"
"topMenuRegion": "#top-menu"
"mainRegion" : "#main"
}
App.on 'initialize:after', ->
Backbone.history.start()
@stuarthalloway
stuarthalloway / Datomic News Updates
Created Jun 18, 2012
Datomic update examples against a social news database
View Datomic News Updates
;; Datomic example code
;; demonstrates various update scenarios, using a news database
;; that contains stories, users, and upvotes
;; grab an in memory database
(use '[datomic.api :only (q db) :as d])
(def uri "datomic:mem://foo")
(d/create-database uri)
(def conn (d/connect uri))
@tobyhede
tobyhede / postsql.sql
Created May 17, 2012
PostgreSQL as JSON Document Store
View postsql.sql
-- PostgreSQL 9.2 beta (for the new JSON datatype)
-- You can actually use an earlier version and a TEXT type too
-- PL/V8 http://code.google.com/p/plv8js/wiki/PLV8
-- Inspired by
-- http://people.planetpostgresql.org/andrew/index.php?/archives/249-Using-PLV8-to-index-JSON.html
-- http://ssql-pgaustin.herokuapp.com/#1
-- JSON Types need to be mapped into corresponding PG types
--
@jrochkind
jrochkind / gist:2161449
Created Mar 22, 2012
A Capistrano Rails Guide
View gist:2161449

A Capistrano Rails Guide

by Jonathan Rochkind, http://bibwild.wordpress.com

why cap?

Capistrano automates pushing out a new version of your application to a deployment location.

I've been writing and deploying Rails apps for a while, but I avoided using Capistrano until recently. I've got a pretty simple one-host deployment, and even though everyone said Capistrano was great, every time I tried to get started I just got snowed under not being able to figure out exactly what I wanted to do, and figured I wasn't having that much trouble doing it "manually".

@chrisyour
chrisyour / Folder Preferences
Created Dec 4, 2010
Show hidden files and hidden folders (except .git) in your TextMate project drawer
View Folder Preferences
# Want to show hidden files and folders in your TextMate project drawer? Simple, just modify the file and folder patterns in TextMate's preferences.
# Instructions:
# Go to TextMate > Preferences...
# Click Advanced
# Select Folder References
# Replace the following:
# File Pattern
You can’t perform that action at this time.