Skip to content

Instantly share code, notes, and snippets.

View rtanglao's full-sized avatar
😃
you rock :-)

Roland Tanglao rtanglao

😃
you rock :-)
View GitHub Profile
@staltz
staltz / introrx.md
Last active May 3, 2024 13:00
The introduction to Reactive Programming you've been missing
@jimbojsb
jimbojsb / gist:1630790
Created January 18, 2012 03:52
Code highlighting for Keynote presentations

Step 0:

Get Homebrew installed on your mac if you don't already have it

Step 1:

Install highlight. "brew install highlight". (This brings down Lua and Boost as well)

Step 2:

@anttilipp
anttilipp / temperatureCircle.py
Created August 2, 2017 21:50
Code to reproduce the "Temperature Circle" visualization.
#
# Hi all,
# this is the Python code I used to make the visualization "Temperature circle"
# (https://twitter.com/anttilip/status/892318734244884480).
# Please be aware that originally I wrote this for my tests only so the
# code was not ment to be published and is a mess and has no comments.
# Feel free to improve, modify, do whatever you want with it. If you decide
# to use the code, make an improved version of it, or it is useful for you
# in some another way I would be happy to know about it. You can contact me
# for example in Twitter (@anttilip). Unchecked demo data (no quarantees)
@jakeonrails
jakeonrails / Ruby Notepad Bookmarklet
Created January 29, 2013 18:08
This bookmarklet gives you a code editor in your browser with a single click.
data:text/html, <style type="text/css">#e{position:absolute;top:0;right:0;bottom:0;left:0;}</style><div id="e"></div><script src="http://d1n0x3qji82z53.cloudfront.net/src-min-noconflict/ace.js" type="text/javascript" charset="utf-8"></script><script>var e=ace.edit("e");e.setTheme("ace/theme/monokai");e.getSession().setMode("ace/mode/ruby");</script>
@eyeseast
eyeseast / python.md
Last active November 6, 2023 01:32
How to set up Python in 2022

I have an updated version of this on my blog here: https://chrisamico.com/blog/2023-01-14/python-setup/.

Python

This is my recommended Python setup, as of Fall 2022. The Python landscape can be a confusing mess of overlapping tools that sometimes don't work well together. This is an effort to standardize our approach and environments.

Tools and helpful links:

  • Python docs: https://docs.python.org/3/
  • Python Standard Library:  - Start here when you're trying to solve a specific problem
@sillygwailo
sillygwailo / bash.sh
Last active July 16, 2023 23:09
Beer in my terminal prompt on Fridays
# The following code goes in your ~/.profile
#
# This propmpt shows a beer when you launch a Terminal window on a Fridays.
# It checks every time you get a new prompt. A minute after 11:59M on a
# Thursday, if you press enter, it will add beer to the prompt. A minute
# after 11:59 PM on a Friday, no more beer.
#
# This is for terminals that use the Bash shell, which was the default for
# MacOS previous to Catalina.
@jtleek
jtleek / nhanes-flexdashboard.Rmd
Created March 13, 2019 17:50
Example interactive app in R
---
title: "How does your BMI measure up?"
output: flexdashboard::flex_dashboard
runtime: shiny
---
Inputs {.sidebar}
-------------------------------------
```{r}
from github import Github
import os
g = Github(os.getenv("GITHUB_TOKEN"))
u = g.get_user("....")
for repo in u.get_repos():
print(repo.html_url)
value = input("Delete y/n?")
if value.lower() == "y":
print("Deleting: {}".format(repo.html_url))
@scripting
scripting / sendToSlack.js
Last active July 9, 2022 13:03
A tiny JavaScript app that sends a message to your default Slack channel. Can be customized with a name, icon, emoji or sent to a different channel. Runs in Node.js.
var request = require ("request");
var urlWebHook = "https://hooks.slack.com/services/abcdef"; //the URL you get on your "incoming web hooks" page.
function sendToSlack (s, theUsername, theIconUrl, theIconEmoji, theChannel) {
var payload = {
text: s
};
if (theUsername !== undefined) {
payload.username = theUsername;
We can't make this file beautiful and searchable because it's too large.
Location,Crash Type,Municipality,Year,Crash Count,Latitude,Longitude
GRANDVIEW HWY S & TEMPLETON DR,Property damage only,VANCOUVER,2017,1,49.25909,-123.060191
BOUNDARY RD & REGENT ST,Property damage only,VANCOUVER,2017,1,49.259109,-123.023633
VINE ST & W 14TH AVE,Property damage only,VANCOUVER,2017,1,49.259265,-123.157816
E 13TH AVE & WATSON ST,Property damage only,VANCOUVER,2017,1,49.259302,-123.100497
ASH ST & W 13TH AVE,Property damage only,VANCOUVER,2017,3,49.259493,-123.117658
MACDONALD ST & W 14TH AVE,Property damage only,VANCOUVER,2017,3,49.259579,-123.168318
BALACLAVA ST & W 14TH AVE,Property damage only,VANCOUVER,2017,1,49.259663,-123.174155
FIR ST & W 13TH AVE,Property damage only,VANCOUVER,2017,1,49.259853,-123.141183
E 12TH AVE & KINGSWAY & MILLTOWN PL,Property damage only,VANCOUVER,2017,44,49.259878,-123.096571