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/env bash | |
# usage: `spc` or `spc [number of lines]` | |
lines=${1:-30} | |
for ((i=1; i<=$lines; i++)) | |
do | |
echo | |
done |
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/sh | |
# | |
# redis - this script starts and stops the redis-server daemon | |
# | |
# chkconfig: - 85 15 | |
# description: Redis is a persistent key-value database | |
# processname: redis-server | |
# config: /etc/redis/redis.conf | |
# config: /etc/sysconfig/redis | |
# pidfile: /var/run/redis.pid |
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
# Redis configuration file example | |
# Note on units: when memory size is needed, it is possible to specify | |
# it in the usual form of 1k 5GB 4M and so forth: | |
# | |
# 1k => 1000 bytes | |
# 1kb => 1024 bytes | |
# 1m => 1000000 bytes | |
# 1mb => 1024*1024 bytes | |
# 1g => 1000000000 bytes |
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
<?php | |
// Stampr Mailing Hello World in PHP! | |
require 'vendor/autoload.php'; | |
require 'src/Stampr/Stampr.php'; | |
$stampr_login = "[email protected]"; | |
$stampr_password = "your.stampr.password"; | |
$endpoint = "https://stam.pr/api"; |
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
<?php | |
// Stampr API - Create a Batch for Testing | |
require 'vendor/autoload.php'; | |
require 'src/Stampr/Stampr.php'; | |
$stampr_login = "[email protected]"; | |
$stampr_password = "your.stampr.password"; | |
$endpoint = "https://stam.pr/api"; |
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
// see mawhorter.net for full post | |
// Put this in an after:render event handler. | |
// Be warned: Ripped out of working code and renamed variables without testing. | |
var fabricMain = new fabric.Canvas('main') | |
, fabricThumb = new fabric.Canvas('screenshot') | |
, ctxThumbnail = $('canvas#thumbnail')[0].getContext('2d'); |
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
// Simple proxy/forwarding server for when you don't want to have to add CORS during development. | |
// Usage: node proxy.js | |
// Open browser and navigate to http://localhost:9100/[url] | |
// Example: http://localhost:9100/http://www.google.com | |
// This is *NOT* for anything outside local development. It has zero error handling among other glaring problems. | |
// This started as code I grabbed from this SO question: http://stackoverflow.com/a/13472952/670023 |
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
@echo off | |
REM You may need to add `cd %WORKSPACE%` in the jenkins project prior to | |
REM calling this script. I have it in mine and didn't test without. | |
REM Correct paths to respective applications as-needed | |
SET PATH=%PATH%;C:\Program Files (x86)\nodejs;C:\Program Files (x86)\Git\bin;%AppData%\npm;C:\Ruby200-x64\bin | |
echo Installing or updating bower... |
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 fs = require('fs'); | |
var path = require('path'); | |
var async = require('async'); | |
var request = require('request'); | |
var tasks = {}; | |
var json = { /* your records */ }; |
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
@echo off | |
REM This will fail with "the input line is too long" if you have a lot of files... maybe? | |
REM Don't know why, but I think the solution is breaking the body of the for () into a separate | |
REM batch. But... IDGAF. | |
echo Starting... | |
for %%i in (*.*) do ( | |
echo Looking at... %%~di%%~pi%%~ni%%~xi |
OlderNewer