Skip to content

Instantly share code, notes, and snippets.

@shandanjay
shandanjay / chmodr.sh
Created May 21, 2016 01:28 — forked from francisbyrne/chmodr.sh
Recursive chmod script for dirs and/or files
#!/bin/sh
#
# chmodr.sh
#
# author: Francis Byrne
# date: 2011/02/12
#
# Generic Script for recursively setting permissions for directories and files
# to defined or default permissions using chmod.
#
@shandanjay
shandanjay / slack-user-timezones.php
Created May 17, 2016 04:19 — forked from kasparsd/index.html
Get user timezones using Slack API
<?php
$api_token = 'slack-api-token';
if ( file_exists( 'users.json' ) ) {
$api_users = file_get_contents( 'users.json' );
} else {
$api_users = file_get_contents( 'https://slack.com/api/users.list?token=' . $api_token );
if ( false === $api_users ) {
@shandanjay
shandanjay / simplecart_parser.clj
Created May 3, 2016 23:31 — forked from sventech/simplecart_parser.clj
Clojure parser for SimpleCart(js) form POST/GET
(ns webstore.simplecart_parser
(:require [clojure.string :as string]))
;; see github.com/sventech/simplecart-js for tax calculation improvement fork
(def input-params
{"item_quantity_1" "1",
"itemCount" "2",
"item_price_1" "9.99",
"store_name" "Online Store",
"item_name_1" "Awesome Product - MP3",

Moving from jQuery

Events

// jQuery
$(document).ready(function() {
  // code
})