Skip to content

Instantly share code, notes, and snippets.

John Louis Del Rosario john2x

Block or report user

Report or block john2x

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@attacus
attacus / riot-matrix-workshop.md
Last active Oct 17, 2019
Create your own encrypted chat server with Riot and Matrix
View riot-matrix-workshop.md

This guide is unmaintained and was created for a specific workshop in 2017. It remains as a legacy reference. Use at your own risk.

Running your own encrypted chat service with Matrix and Riot

Workshop Instructor:

This workshop is distributed under a CC BY-SA 4.0 license.

What are we doing here?

@arohner
arohner / google-api.clj
Created Nov 5, 2016
Clojure example of accessing google APIs directly
View google-api.clj
(ns example.api.google
(:require [cemerick.url :as url]
[cheshire.core :as json]
[clj-jwt.core :as jwt]
[clj-jwt.key :as key]
[clj-time.core :as time]
[clj-http.client :as http]
[clojure.string :as str])
(:import java.io.StringReader))
@kristopolous
kristopolous / hn_seach.js
Last active Oct 7, 2019
hn job query search
View hn_seach.js
function query() {
var
// HN is done with very unsemantic classes.
job_list = Array.prototype.slice.call(document.querySelectorAll('.c5a,.cae,.c00,.c9c,.cdd,.c73,.c88')),
query_list = Array.prototype.slice.call(arguments),
shown = 0, total = job_list.length;
// Traverses up the dom stack trying to find a match of a specific class
function up_to(node, klass) {
if (node.classList.contains(klass)) {
@TSiege
TSiege / The Technical Interview Cheat Sheet.md
Last active Oct 18, 2019
This is my technical interview cheat sheet. Feel free to fork it or do whatever you want with it. PLEASE let me know if there are any errors or if anything crucial is missing. I will add more links soon.
View The Technical Interview Cheat Sheet.md

ANNOUNCEMENT

I have moved this over to the Tech Interview Cheat Sheet Repo since a gist is too difficult to maintain as an open source endevaor and there is no way to version it. I have updated below, but I will not be able to keep this one up to date so please checkout the repo instead. The below is just for some preservation for those who stumble across here.






\

View core.cljs
(ns react-cljs.core
(:require React))
(declare render)
(defn handle-change [e]
(render {:text (.. e -target -value)}))
(defn render [{:keys [text]}]
(React/renderComponent
@Daniel15
Daniel15 / 1_README.md
Last active Oct 1, 2019
Complete Google Drive File Picker example
View 1_README.md

Google Drive File Picker Example

This is an example of how to use the Google Drive file picker and Google Drive API to retrieve files from Google Drive using pure JavaScript. At the time of writing (14th July 2013), Google have good examples for using these two APIs separately, but no documentation on using them together.

Note that this is just sample code, designed to be concise to demonstrate the API. In a production environment, you should include more error handling.

See a demo at http://stuff.dan.cx/js/filepicker/google/

@stuartsierra
stuartsierra / lein2-issue.md
Created Jul 6, 2012
'file:' repositories in Leiningen 2.0.0-preview5 and later
View lein2-issue.md

Sample Project

Starting from:

lein new foo
cd foo

Say I have a random JAR file that is not available in any repository:

touch README.md
@canton7
canton7 / 0main.md
Last active Oct 3, 2019
Local versions of tracked config files
View 0main.md

How to have local versions of tracked config files in git

This is a fairly common question, and there isn't a One True Answer.

These are the most common techniques:

If you can modify your application

View 2 ajax requests?
<div id="container">
<input type="hidden" id="var" value="wenbert"/>
<input type="button" id="thebutton" value="Click"/>
</div>
<script type="text/javascript">
$(document).ready(function() {
<script type="text/javascript">
$(document).ready(function() {
$("#thebutton").click(function(){
call_ajax1();
@MicahElliott
MicahElliott / colortrans.py
Created Nov 29, 2010
Convert values between RGB hex codes and xterm-256 color codes.
View colortrans.py
#! /usr/bin/env python
""" Convert values between RGB hex codes and xterm-256 color codes.
Nice long listing of all 256 colors and their codes. Useful for
developing console color themes, or even script output schemes.
Resources:
* http://en.wikipedia.org/wiki/8-bit_color
* http://en.wikipedia.org/wiki/ANSI_escape_code
You can’t perform that action at this time.