Skip to content

Instantly share code, notes, and snippets.

Avatar

Hugo hugo-dc

View GitHub Profile
View pulsar.js
return function (r, w) {
for (var i = 0; i < w.data.length; i += 4) {
w.data[i] = r.data[i]/(w.data[i]+1)*100+1;
w.data[i+1] = r.data[i+1]/(w.data[i+1]+1)*100+1;
w.data[i+2] = r.data[i+1]/(w.data[i+2]+1)*100+1;
w.data[i+3] = 255;
}
}
@mietek
mietek / i-dont-get-functional-programming.md
Last active Aug 29, 2015
Partial transcript of “I Don’t Get Functional Programming”
View i-dont-get-functional-programming.md

10: I Don’t Get Functional Programming

The Bike Shed

Partial transcript (35:10–39:10)

Derek Prior: “How is that ecosystem? I know when we first deployed things, it wasn’t going particularly well.”

Pat Brisbin: “Although the deployment was difficult, the ecosystem’s great. There’s, like I said, thousands of libraries to do anything that you need.”

View cordova.hs
--
-- Hello-World of the cordova/phonegap application using Haskell.
--
-- here is the screenshoot
--
-- https://twitter.com/AGoCorona/status/532948528621178880
--
-- So that Haste-Haskell can be used to create hybrid smartphone applications
--
-- The original cordova JavaScript hello world is installed following the instructions of this page
@jyr
jyr / paths.py
Created Oct 5, 2011
Python path with eggs
View paths.py
import sys
import os
site_packages = "/Your/path/to/site-packages/"
sys.path.insert(0, site_packages)
def python_path_eggs():
paths = []
for egg in os.listdir(site_packages):
@qmacro
qmacro / ODataTable.html
Created Feb 13, 2012
SAPUI5 says "Hello OData" to NetWeaver Gateway
View ODataTable.html
<html>
<head>
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<title>SAP OData in SAPUI5 Data Table Control</title>
<!-- Load SAPUI5, select theme and control library -->
<script id="sap-ui-bootstrap"
type="text/javascript"
src="http://gateway.server:port/sapui5/sapui5-static/resources/sap-ui-core.js"
data-sap-ui-theme="sap_platinum"
@Indamix
Indamix / gist:2226290
Created Mar 28, 2012
css 3d bended shadow
View gist:2226290
.bended-shadow {position:relative}
.bended-shadow::before, .bended-shadow::after {
content: '';
position: absolute;
width: 60%;
height: 20px;
-webkit-box-shadow: 0 8px 16px rgba(0, 0, 0, 0.5);
-moz-box-shadow: 0 8px 16px rgba(0, 0, 0, 0.5);
-ms-box-shadow: 0 8px 16px rgba(0, 0, 0, 0.5);
@chubas
chubas / cas-bot.md
Last active Dec 10, 2015
Cards Against Slack
View cas-bot.md

GDLJS Monthly Challende #2 - Cards Against Slack

CAH

The task for this month is to create a simple Hubot script to play Cards Against Humanity on Slack. Yay productivity!

Rules

The rules for the challenge will be the minimum set of rules of the game (full rules), only using the house rule of public voting (God is Dead rule)

@codedot
codedot / Makefile
Last active Dec 29, 2015
Hedging client for Ripple
View Makefile
HEDGE = node riphedge
all:
npm install ripple-lib
hedge:
$(HEDGE) | tee hedge.txt
grep -q Ask hedge.txt
mailx -s "`grep Ripples hedge.txt`" me <hedge.txt
@natyusha
natyusha / config.ini
Last active Feb 2, 2016
bug.n config
View config.ini
; bug.n - tiling window management
; @version 9.0.0
;;Status bar
Config_showBar=1
Config_horizontalBarPos=left
Config_verticalBarPos=top
Config_barWidth=100%
Config_singleRowBar=1
Config_spaciousBar=0
@dpwiz
dpwiz / scotty-auth.hs
Last active Aug 31, 2016
Check Basic HTTP Authentication in Scotty
View scotty-auth.hs
main :: IO ()
main = scotty 3000 app
app :: ScottyM ()
app = do
rcon <- liftIO $ R.connect R.defaultConnectInfo {R.connectPort = R.UnixSocket "redis.sock"}
get "/favicon.ico" $ html "ಠ_ಠ"
get "/:method" $ do