Skip to content

Instantly share code, notes, and snippets.

View podviaznikov's full-sized avatar
🗽
NYC, hacking, thinking, observing, feeling

anton podviaznikov

🗽
NYC, hacking, thinking, observing, feeling
View GitHub Profile
// https://[my-awesome-team].slack.com/team
$('#active_members .team_list_item').map(function(i, m) {
var name = $('.member_name', m).text().split(' ')
var email = $('a[title^="Email"]', m).text()
return [name, email].join(',')
}).toArray().join('\n');
@kordless
kordless / README.md
Last active August 29, 2015 14:21
StackMonkey Quick and Dirty APIs
(deftask s3cmd
"Sync frontend with S3 bucket."
[b bucket-name NAME str "Name of the bucket to sync to."]
(assert bucket-name "bucket-name is a required argument.")
(let [tmp (temp-dir!)
path (str (.getPath tmp) "/")
ACCESS (System/getenv "ADZERK_AWS_ACCESS_KEY")
SECRET (System/getenv "ADZERK_AWS_SECRET_KEY")]
(with-pre-wrap fs
(with-let [fs fs]
# Depends on working pdftk, gm (GraphicsMagick), and pdftotext (Poppler) commands.
# Splits a pdf into batches of N pages, creates their thumbnails and icons,
# as specified in the Job options, gets the text for every page, and merges
# it all back into a tar archive for convenient download.
#
# See <tt>examples/process_pdfs_example.rb</tt> for more information.
class ProcessPdfs < CloudCrowd::Action
# Split up a large pdf into single-page pdfs. Batch them into 'batch_size'
# chunks for processing. The double pdftk shuffle fixes the document xrefs.
@HenrikJoreteg
HenrikJoreteg / serverAndBrowserModule.js
Created February 18, 2011 19:47
Another approach to doing re-usable backbone models
if (typeof require == 'undefined') {
var exports = window,
server = false;
} else {
var Backbone = require('./backbone'),
_ = require('underscore')._,
server = true;
}
exports.TeamModel = Backbone.Model.extend()
@WebReflection
WebReflection / Object.prototype.define.html
Created October 15, 2011 12:25
100% code coverage for Object.prototype.define test
<!doctype html>
<html>
<head>
<title>wru</title>
<!-- https://github.com/WebReflection/wru -->
<script src="define.js"></script>
<script>function wru(wru){var assert=wru.assert,async=wru.async;
// enojy your tests!
(ns virgil
(:require
[clojure.java.io :as io]
[clojure.string :as str]
[filevents.core :as fe])
(:import
[javax.tools
DiagnosticCollector
ForwardingJavaFileManager
JavaCompiler
@torrez
torrez / Shell log.sh
Created April 23, 2012 04:50 — forked from acdha/Shell log.sh
Contortions needed to create an AWS RDS database using UTF-8
brew install rds-command-line-tools
rds-create-db-parameter-group mysql-utf8 -f mysql5.1 -d "MySQL 5.1 configured for UTF-8"
rds-modify-db-parameter-group mysql-utf8 \
--parameters="name=character_set_server, value=utf8, method=immediate" \
--parameters="name=character_set_client, value=utf8, method=immediate" \
--parameters="name=character_set_results,value=utf8,method=immediate" \
--parameters="name=collation_server, value=utf8_general_ci, method=immediate" \
--parameters="name=collation_connection, value=utf8_general_ci, method=immediate"
@hugoduncan
hugoduncan / gist:2839891
Created May 31, 2012 00:41
OAuth with friend and oauthentic
(ns myapp.authenticate.oauth
"OAuth authentication"
(:require
[cheshire.core :as json]
[clj-http.client :as http]
[clojure.string :as string]
[clojure.tools.logging :as logging])
(:use
[oauthentic.core :only [build-authorization-url fetch-token]]
[ring.util.response :only [redirect]]
@cyberwombat
cyberwombat / CORS Configuration
Created November 1, 2012 19:18
JQuery file upload plugin (blueimp) with NodeJs Express3 directly to Amazon S3 with public access
<?xml version="1.0" encoding="UTF-8"?>
<CORSConfiguration xmlns="http://s3.amazonaws.com/doc/2006-03-01/">
<CORSRule>
<AllowedOrigin>*</AllowedOrigin>
<AllowedMethod>GET</AllowedMethod>
<AllowedMethod>POST</AllowedMethod>
<AllowedMethod>PUT</AllowedMethod>
<MaxAgeSeconds>3000</MaxAgeSeconds>
<AllowedHeader>*</AllowedHeader>
</CORSRule>