This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var download = (filename, text) => { | |
var element = document.createElement('a'); | |
element.setAttribute('href', 'data:text/plain;charset=utf-8,' + encodeURIComponent(text)); | |
element.setAttribute('download', filename); | |
element.style.display = 'none'; | |
document.body.appendChild(element); | |
element.click(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
This is free and unencumbered software released into the public domain. | |
Anyone is free to copy, modify, publish, use, compile, sell, or | |
distribute this software, either in source code form or as a compiled | |
binary, for any purpose, commercial or non-commercial, and by any | |
means. | |
In jurisdictions that recognize copyright laws, the author or authors | |
of this software dedicate any and all copyright interest in the |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Usage: md2gd <PATH>.md | |
# Prerequisites: | |
# - gdrive cli | |
# - brew install gdrive | |
# - https://github.com/prasmussen/gdrive | |
# - authorization for the action is required | |
# - pandoc | |
# - brew install pandoc | |
# Known issues: | |
# - lists started with dashes in markdown end up being bulleted in a GDoc |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
requireNoConflict=(function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof requireNoConflict=="function"&&requireNoConflict;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof requireNoConflict=="function"&&requireNoConflict;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(require,module,exports){ | |
'use strict'; | |
var Class = require('./class'); | |
var AirtableError = Class.extend({ | |
init: function(error, message, statusCode) { | |
this.error = error; | |
this.message = message; | |
this.statusCode = statusCode; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package no.bstcm.loyaltyapp.core.util; | |
import android.view.View; | |
import android.widget.AbsListView; | |
import com.etsy.android.grid.StaggeredGridView; | |
import no.bstcm.loyaltyapp.core.R; | |
/** |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/osascript | |
set homePath to POSIX path of (path to home folder) | |
set iTermAutomation to load script POSIX file (homePath & "tmuxinator.scpt") | |
set projectDir to homePath & "Desktop/Ruby/growth-republic/iview-prototype" | |
tell iTermAutomation | |
openFullScreenTerminal() | |
activateSessionAndRunCommand("git fetch") | |
splitPaneHorizontally() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Default PS1 | |
default_ps1="\[\033[01;32m\]\u:\[\033[01;34m\]\w\[\033[00m\]" | |
# By default on Mac OSX ls's output is without colours. | |
alias ls='ls -G' | |
GOLIATH_PORT=9201 | |
alias goliath="/etc/init.d/goliath_$GOLIATH_PORT" | |
alias redis='redis-server /usr/local/etc/redis.conf' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
bundle exec rake assets:precompile | |
repository_root=$(git rev-parse --show-toplevel) | |
assets_directory="$repository_root/public/assets" | |
# 1. reads diff from the manifest.yml | |
# 2. takes only those lines which represent replaced assets | |
# 3. remove duplicates like: application.js => application/index.js |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Default PS1 | |
default_ps1="\[\033[01;32m\]\u:\[\033[01;34m\]\w\[\033[00m\]" | |
# By default on Mac OSX ls's output is without colours. | |
alias ls='ls -G' | |
GOLIATH_PORT=9201 | |
alias goliath="/etc/init.d/goliath_$GOLIATH_PORT" | |
alias redis='redis-server /usr/local/etc/redis.conf' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# uses ruby 2.0 | |
require 'test/unit' | |
module Symmetry | |
refine Array do | |
# Returns index of the first equilibrium if found or nil otherwise. | |
# Equilibrium is a symmetry point of an array - sum of elements before given element equals to a sum of the elements after it. | |
# | |
# Caution! |