This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;; With numeric ARG, display the tool bar if and only if ARG is | |
;; positive. Tool bar has icons document (read file), folder (read | |
;; directory), X (discard buffer), disk (save), disk+pen (save-as), | |
;; back arrow (undo), scissors (cut), etc. | |
(tool-bar-mode 0) | |
;; Get rid of the annoying splash and startup screens | |
(setq inhibit-splash-screen t | |
inhibit-startup-message t) | |
(setq grep-program "egrep") | |
(setq-default fill-column 72) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
import os | |
import random | |
class Follower: | |
def __init__(self, starting_location, current_victim=None): | |
# `starting_location` is a string representing a file system path. | |
self.location = starting_location | |
self.current_victim = current_victim |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
import os | |
import random | |
class Follower: | |
def __init__(self, starting_location, current_victim=None): | |
# `starting_location` is a string representing a file system path. | |
self.location = starting_location | |
self.current_victim = current_victim |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;;; Directory Local Variables | |
;;; For more information see (info "(emacs) Directory Variables") | |
((python-mode | |
(python-shell-virtualenv-path . "/Users/mdeboard/Envs/sumo"))) | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
from math import ceil, floor, log10 | |
ones = { | |
1: 'one', | |
2: 'two', | |
3: 'three', | |
4: 'four', | |
5: 'five', |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;; Version 1 | |
{:user {:plugins [[luminus/lein-template "2.9.10.74"]]} | |
:repl {:dependencies [[cider/cider-nrepl "0.15.0-snapshot"]]}} | |
;; Version 2 | |
{:user {:plugins [[luminus/lein-template "2.9.10.74"]] | |
:dependencies [[cider/cider-nrepl "0.15.0-snapshot"]]}} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
guestbook.db.core> (require '[guestbook.core :refer :all]) | |
nil | |
guestbook.db.core> (mount.core/start #'*db*) | |
ClassCastException mount.core.DerefableState cannot be cast to clojure.lang.IFn guestbook.db.core/eval4338/fn--4339 (core.clj:11) | |
guestbook.db.core> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;; Running `clojure-jack-in' here | |
(ns guestbook.db.core | |
(:require | |
[conman.core :as conman] | |
[mount.core :refer [defstate]] | |
[guestbook.config :refer [env]])) | |
(defstate ^:dynamic *db* | |
:start (conman/connect! | |
{:datasource |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require('normalize.css/normalize.css'); | |
require('styles/App.css'); | |
require('codemirror/lib/codemirror.css'); | |
import React from 'react'; | |
import Paste from './Paste'; | |
import LanguageStore from '../stores/LanguageStore'; | |
import Constants from '../AppConstants'; | |
import { codemirror } from '../../cfg/base.js'; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
create table mydata_real (id serial, date date, value text); | |
create table mydata_real_y2015 (check (date >= '2015-01-01' and date < '2016-01-01')) inherits (mydata_real); | |
create table mydata_real_y2016 (check (date >= '2016-01-01' and date < '2017-01-01')) inherits (mydata_real); | |
create function mydata_nope() returns trigger language plpgsql | |
as $f$ begin raise exception 'insert on wrong table'; return NULL; end; $f$; | |
create trigger mydata_nope before insert on mydata_real execute procedure mydata_nope(); | |
create view mydata as select * from mydata_real; |