This file contains hidden or 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 | |
set -euxo pipefail | |
TOKEN=INSERT_YOUR_TOKEN | |
# Get subscription count | |
curl -i -H "X-Recharge-Access-Token: ${TOKEN}" \ | |
-X GET 'https://api.rechargeapps.com/subscriptions/count?created_at_min=2017-09-01T00:00:00' |
This file contains hidden or 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
'use strict'; | |
/* | |
* Find Waypoint instances by DOM element | |
*/ | |
var compact = require('lodash/fp/compact'); | |
var filter = require('lodash/fp/filter'); | |
var flatten = require('lodash/fp/flatten'); | |
var forEach = require('lodash/fp/forEach'); |
This file contains hidden or 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
montage *.png -tile 1x10 -geometry 128x128+0+2 -background transparent sprite.png |
This file contains hidden or 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 | |
for files in *.wmv | |
do | |
avconv -y -i "$files" -ss 0 -vframes 1 "${files%.wmv}_poster.jpg" | |
avconv -y -i "$files" -vcodec libtheora -acodec libvorbis -b:v 500k "${files%.wmv}.ogv" | |
avconv -y -i "$files" -pix_fmt yuv420p -c:v libx264 -b:v 500k -crf 30 -preset slower -profile:v Main -level 31 -c:a aac -b:a 192k -strict experimental "${files%.wmv}.mp4" | |
done |
This file contains hidden or 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
// Run the code in developer console, done best through Chrome's Javascript snippets | |
// First add LoDash | |
$('body').append('<script src="//cdn.jsdelivr.net/lodash/2.4.1/lodash.min.js"></script>'); | |
// Add range of steps to Bold Apps Product Option dropdown | |
(function() { | |
var valueRange = _.range(-5, 5.25, 0.25); | |
function addNewValue(value) { |
This file contains hidden or 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
exec = require('child_process').exec | |
_ = require('lodash') | |
autoprefix = require('gulp-autoprefixer') | |
chalk = require('chalk') | |
concat = require('gulp-concat') | |
es = require('event-stream') | |
gulp = require('gulp') | |
gutil = require('gulp-util') | |
order = require('gulp-order') | |
plumber = require('gulp-plumber') |
This file contains hidden or 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
@mixin clearfix { | |
*zoom:1; | |
&:before, &:after { content: " "; display: table; } | |
&:after { clear: both; } | |
} |
This file contains hidden or 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
//************************************************************************// | |
// Generate a variable ($all-text-inputs) with a list of all html5 | |
// input types that have a text-based input, excluding textarea. | |
// http://diveintohtml5.org/forms.html | |
//************************************************************************// | |
$inputs-list: 'input[type="email"]', | |
'input[type="number"]', | |
'input[type="password"]', | |
'input[type="search"]', | |
'input[type="tel"]', |
This file contains hidden or 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
// 1. Get list of files | |
// 2. For each file: | |
// 2.1 Read a file | |
// 2.2 Find required data | |
// 2.3 Put the information in a JSON object | |
// 3. Convert JSON object to YAML | |
// 4. Write new Markdown file in _posts folder | |
var fs = require('fs') |
This file contains hidden or 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 codeblocks = document.getElementsByClassName('highlight'); | |
for (var i = 0; i < codeblocks.length; ++i) { | |
var item = codeblocks[i]; | |
// console.log("Old height:" + " " + item.offsetHeight); | |
item.style.height = item.offsetHeight + 1 + 'px'; | |
// console.log("New height:" + " " + item.offsetHeight); | |
} |
NewerOlder