Skip to content

Instantly share code, notes, and snippets.

(ns com.sakekasi.linkshare.core
"the core namespace does routing and http request handling"
(:require [liberator.core :refer [resource defresource]]
[liberator.dev :refer [wrap-trace]]
[clojure.data.json :as json]
[clojure.java.io :as io]
[clojure.string :refer [split]]
[ring.middleware.params :refer [wrap-params]]
#!/usr/bin/env python
from twisted.internet import protocol, reactor
from twisted.internet.endpoints import TCP4ClientEndpoint, TCP4ServerEndpoint
from twisted.protocols.basic import LineReceiver
from functools import partial
from time import strftime, localtime, gmtime
import datetime
import parse
@sakekasi
sakekasi / README.md
Last active August 29, 2015 14:20
Establishing a Feedback Loop for design iteration

When working to create a product or application, often, the team building said product learns on the job. The team gains an understanding of the specific domain of the application in order to add degrees of freedom to the code in order to allow for any of a number of goals (e.g. a minimum of dependencies across modules for easy team based development).

In order to aid this process of design, I'd like to propose an application that serves as a guide for programmers (or teams of programmers), helping them towards better design. While this tool does include some technical capabilities (e.g. design test cases via code analysis), its main function is sociological. Iterating on a design and prototyping will provide software designers an opportunity to really understand the domain in which they are working with a specific piece of software.

  • phases of the process
    • initial high level strategy phase
    • iterate
      • strategy/design
        • detail what you seek to learn/try out this time around
  • write '
@sakekasi
sakekasi / README.md
Created May 5, 2015 17:07
midterm study guide

Thesis:

One of the many difficulties of studying Indian art is the lens of perception which the western upbringing we all share imposes upon us. We experience Indian culture as something fundamentally other, and the varied methods for this culture to reach us are fundamentally flawed in eigther the accuracy of the message they impart, or the size of the audience which can be reached by said message. Here, I seek to examine some of these methods, and to discuss their perceived quality in informing the layperson.

Structure:

  • popular media/oriental lens
  • indiana jones
@sakekasi
sakekasi / .gitignore
Created September 15, 2011 03:23
CodingBat Recursion-1 CountX
*.class
@sakekasi
sakekasi / backtrace.txt
Created August 29, 2012 00:09
Backtrace for game of life
#0 0x00007ffff7bd5e0c in GameOfLife::cells_get(int, int) () from libgame-of-life.so
#1 0x00007ffff7bd5e65 in GameOfLife::create_updated_grid() () from libgame-of-life.so
#2 0x00007ffff7bd5fb5 in GameOfLife::tick() () from libgame-of-life.so
#3 0x00007ffff7bd6af8 in sigc::adaptor_functor<sigc::bound_mem_functor0<bool, GameOfLife> >::operator()() const () from libgame-of-life.so
#4 0x00007ffff7bd6b0a in sigc::internal::slot_call0<sigc::bound_mem_functor0<bool, GameOfLife>, bool>::call_it(sigc::internal::slot_rep*) () from libgame-of-life.so
#5 0x00007ffff62434f2 in ?? () from /lib/libglibmm-2.4.so.1
#6 0x00007ffff4e9800b in ?? () from /lib/libglib-2.0.so.0
#7 0x00007ffff4e97475 in g_main_context_dispatch () from /lib/libglib-2.0.so.0
#8 0x00007ffff4e977a8 in ?? () from /lib/libglib-2.0.so.0
#9 0x00007ffff4e97ba2 in g_main_loop_run () from /lib/libglib-2.0.so.0
@sakekasi
sakekasi / errors
Created November 12, 2012 04:18
error messages from -Wall -pedantic
g++ gtk-floodit-board.cc -fPIC -c -O -o gtk-floodit-board.o `pkg-config gtkmm-3.0 cairomm-1.0 --cflags` `pkg-config gtkmm-3.0 cairomm-1.0 --libs` -Wall -pedantic
gtk-floodit-board.cc: In constructor 'GtkFlooditBoard::GtkFlooditBoard()':
gtk-floodit-board.cc:15:64: warning: base 'Gtk::DrawingArea' will be initialized after [-Wreorder]
gtk-floodit-board.cc:15:64: warning: base 'FlooditBoard' [-Wreorder]
gtk-floodit-board.cc:14:1: warning: when initialized here [-Wreorder]
gtk-floodit-board.cc: In constructor 'GtkFlooditBoard::GtkFlooditBoard(FlooditBoard*)':
gtk-floodit-board.cc:29:27: warning: delegating constructors only available with -std=c++11 or -std=gnu++11 [enabled by default]
g++ floodit-board.cc -fPIC -c -O -o floodit-board.o -Wall -pedantic
floodit-board.cc: In member function 'color FlooditBoard::set_color(int, int, color)':
floodit-board.cc:106:1: warning: no return statement in function returning non-void [-Wreturn-type]
@sakekasi
sakekasi / read-command.c
Last active December 24, 2015 18:59
my code
//command stack. used to store operands
typedef struct cmd_stk
{
command_t *stack;
unsigned cap;
unsigned index;
}cmd_stk_t;
static cmd_stk_t*
make_cmd_stk(unsigned cap)
@sakekasi
sakekasi / CNF.js
Last active May 7, 2017 17:59
An implementation of directed resolution for CNF knowledge bases
class Literal {
constructor(variable, same) {
this.variable = variable;
this.same = same;
}
equal(other) {
return other instanceof Literal &&
other.variable === this.variable &&
other.same === this.same;
@sakekasi
sakekasi / main.py
Created November 20, 2017 06:19
mystery
def mystery(lst, n):
if n == 0:
return lst
elif lst == []:
return lst
else:
return mystery(lst[1:], n-1) + [lst[0]]
ans = mystery([1,3,4,7,9], 2)