Skip to content

Instantly share code, notes, and snippets.

@ryanb
ryanb / github_tree_slider.js
Created December 6, 2010 17:23
This is how GitHub's new AJAX file browser works.
GitHub.TreeSlider = function () {
if (window.history && window.history.pushState) {
function a() {
if (e.sliding) {
e.sliding = false;
$(".frame-right").hide();
$(".frame-loading:visible").removeClass("frame-loading")
}
}
if (!($("#slider").length == 0 || !GitHub.shouldSlide)) if (!navigator.userAgent.match(/(iPod|iPhone|iPad)/)) {
@SunboX
SunboX / inlineworker.js
Created June 24, 2013 12:21
Create web workers without a separate worker JS files. Source: http://jsbin.com/owogib/8/
function worker() {
setInterval(function() {
postMessage({foo: "bar"});
}, 1000);
}
var code = worker.toString();
code = code.substring(code.indexOf("{")+1, code.lastIndexOf("}"));
var blob = new Blob([code], {type: "application/javascript"});
@LeCoupa
LeCoupa / meteor.ssl.nginx
Last active January 23, 2022 07:57
How to deploy a Meteor application with SSL on Nginx --> https://github.com/LeCoupa/awesome-cheatsheets
# Note: if you want to run multiple meteor apps on the same server,
# make sure to define a separate port for each.
# Upstreams
upstream gentlenode {
server 127.0.0.1:58080;
}
# HTTP Server
server {
@dotansimha
dotansimha / meteor-package-publisher-for-angular
Last active August 29, 2015 14:24
meteor-package-publisher for all AngularJS packages for specific version
var MeteorPublisher = require('./lib/publisher');
var _ = require('lodash');
var version = '1.4.2'; // bower version
var depVersion = "1.4.2"; // atmosphere version
var packages = ['angular-animate', 'angular-sanitize', 'angular-touch', 'angular-scenario', 'angular-route', 'angular-resource', 'angular-mocks', 'angular-loader', 'angular-cookies', 'angular-messages','angular-aria']; // sub-packages, will depend on the original angular:angular package
var runNextPackage;
var basePackage = {
@luciddreamz
luciddreamz / keycloak.sh
Last active July 24, 2024 08:58 — forked from paoloantinori/keycloak.sh
Keycloak Admin API Rest Example: Get User
#!/bin/bash
# requires https://stedolan.github.io/jq/download/
# config
KEYCLOAK_URL=http://localhost:8080/auth
KEYCLOAK_REALM=realm
KEYCLOAK_CLIENT_ID=clientId
KEYCLOAK_CLIENT_SECRET=clientSecret
USER_ID=userId