Skip to content

Instantly share code, notes, and snippets.

View blissdev's full-sized avatar

Jordan Arentsen blissdev

View GitHub Profile
@jmreidy
jmreidy / thread.cljs
Created February 4, 2014 01:32
Clojure threading macors
;Retuns 5
(-> 25
(/ 5))
;Return 1/5
(->> 25
(/ 5))
@dysinger
dysinger / idris
Last active August 29, 2015 13:56
HELP I'M NEW TO HASKELL AND CABAL IS KILLING ME!!!
# REMOVE ANYTHING CABAL HAS EVER DROPPED ONTO YOUR SYSTEM
rm -rf ~/.{ghc,cabal}
# UPDATE CABAL
cabal update
# UPGRADE CABAL TO 1.18 (BECAUSE THEY ADDED SANDBOXES)
cabal install cabal-install
export PATH=~/.cabal/bin:$PATH ;# PUT THIS IN YOUR PROFILE
@OhMeadhbh
OhMeadhbh / dysfunction.dys
Last active August 29, 2015 14:03
Dysfunction : a transfer syntax indented to irritate everyone
; dysfunction.dys
;
; Dysfunction is a new specification for communicating typed, structured,
; dynamic data between computing systems (or processes on the same system.)
; It defines a transfer syntax and processing expectations for systems which
; produce and consume formated data. This file is a brief introduction to
; Dysfunction, along with a few examples.
;
; Dysfunction is used in the same way JSON or XML might be used to store or
; communicate human readable representations of structured data. It is designed
@dwwoelfel
dwwoelfel / utils.clj
Created August 1, 2014 06:31
Hack to get something approximating paint rectangles with React/om. Has very rough edges!
(defmacro html [body]
`(if-not (:render-colors? initial-query-map)
(html/html ~body)
(let [body# ~body]
(try
(let [[tag# & rest#] body#
attrs# (if (map? (first rest#))
(first rest#)
{})
rest# (if (map? (first rest#))
@addyosmani
addyosmani / appcache-tooling.md
Last active August 29, 2015 14:05
AppCache manifest generation tooling

Tools that read through a directory, stream or tree and create an Application Cache manifest for you.

AppCache is still a douche but luckily there are tools available to take the pain out of generating your initial manifest files:

  • Grunt: grunt-manifest is currently the de facto option, but the project lead is looking for a new maintainer. In light of that grunt-appcache is an alternative in case you're looking for more active support.
  • Gulp: gulp-manifest is inspired by grunt-manifest and has a similar set of options.
  • Broccoli: broccoli-manifest brings manifest file compilation based on trees.

Do review what is generated. As with any automation tooling, be careful that what is being generated is what you actually intend on being cached. I generally rel

@borkdude
borkdude / tooltip-om.clj
Last active August 29, 2015 14:06
Add tooltip to Om DOM components showing displayname and contents of cursor and local state
;;; To add a tooltip, write (tooltip {:className "foo"}) instead of #js {:className "foo"}
;;; You can simplify this and just show what you need: #js {:title (pr-str (om/...))}.
;;; testfoo.core (cljs)
(ns testfoo.core
(:require-macros [testfoo.macros :refer (tooltip)])
(:require [om.core :as om :include-macros true]
[om.dom :as dom :include-macros true]
[cljs.reader :as reader]))

Someone tried to exploit the Shellshock vulnerability in Bash on lodash.com, likely as part of a mass-exploit attempt.

In this case, the exploit attempted to download a modified version of @schierlm’s pseudo-terminal Perl script that would connect to 72.167.37.182 on port 23. The download URL contains the targeted host name (?h=lodash.com) which gives the attacker an indication of which hosts might have the /tmp/a.pl backdoor in place.

@blissdev
blissdev / client-id-gen.php
Created October 27, 2014 21:51
Client ID Generator
echo substr(hash('sha256', time()), 0, 32);
/*
* based on https://gist.github.com/sebmarkbage/fac0830dbb13ccbff596
* by Sebastian Markbåge
*/
import React from 'react';
const noop = () => {};
const es6ify = (mixin) => {
if (typeof mixin === 'function') {
@timoxley
timoxley / gist:ae19556a33dd3867a697
Last active August 29, 2015 14:20
tl;dr. 2.5 Dynamic Behavior Changes: Changing An Instance’s Class and Dynamic Inheritance

Organizing Programs Without Classes

Source: https://cs.au.dk/~hosc/local/LaSC-4-3-pp223-242.pdf

Section 2.5 Dynamic Behavior Changes: Changing An Instance’s Class and Dynamic Inheritance

tl;dr

Sometimes the behavior of an instance of a data type can be divided into several different “modes” of behavior or implementation…