Skip to content

Instantly share code, notes, and snippets.

@dblock
dblock / dokku-mongo-export.sh
Last active June 11, 2020 12:20
Backup MongoDB databases with Dropbox and Dokku
#!/bin/bash
set -e
echo "Backing up MongoDB databases to Dropbox ..."
dt=$(date +"%Y-%m-%d")
echo " today is $dt"
@stracqan
stracqan / usb-credit-card-reader.js
Last active October 28, 2023 14:14
Very simple jQuery implementation that reads card data from a USB Magnetic Strip Credit Card Reader.
/**
*
* Simple jQuery Script to parse credit card data
* that was collected via a USB Magnetic Stripe
* Credit Card Reader.
*
* To get this to work, focus your cursor (either
* programmatically or via a click, it's your choice) on an input field #credit-card-number
* and then with the card reader plugged in, swipe
* the card and it will take over from there
anonymous
anonymous / content
Created January 14, 2016 16:01
<?php
/*
* Plugin Name: Ellipsis Human Presence Technology
* Plugin URI: http://www.humanpresence.net/wp-ellipsis-plugin/
* Description: Industry leading bot detection and analytics through the use of the Ellipsis Human Presence score proprietary technology. To get started: 1) Click the "Activate" link to the left of this description, 2) Go to the Ellipsis plugin <a href="../wp-admin/admin.php?page=wp-ellipsis">settings page</a> in the admin menu on the far left, and 3) Connect to Ellipsis with your company name and username.
* Version: 1.0
* Author: Ellipsis
* Author URI: http://www.humanpresence.net
* License: GPL2
@aaronksaunders
aaronksaunders / developer-wanted.md
Last active April 19, 2016 19:04
Looking for Javascript Developer with Appcelerator Experience

###Clearly Innovative Inc We are looking for a talented candidate with 2-4 years of cross-platform mobile application development. The candidate will work with a team of designers, developers and project managers to create mobile solutions for clients ranging from startups to large enterprises. The candidate should have 1-2 years of experience with front-end development. We are considering full-time and contract employees. For part-time and contract employees, we are looking for a minimum of 30 hours per week.

We are looking for candidates with the following:

Responsibilities:

  • Write and modify code based on functional and system requirements
  • Work closely with the project manager, designer and other developers to understand functional and system requirements
  • Work closely with the development team to ensure architectural integrity and product quality
var gulp = require('gulp');
var less = require('gulp-less');
gulp.task('less', function() {
return gulp.src('./style.less') // only compile the entry file
.pipe(less())
.pipe(gulp.dest('./build'))
});
gulp.task('watch', function() {
gulp.watch('./*.less', ['less']); // Watch all the .less files, then run the less task
@kottenator
kottenator / simple-pagination.js
Created July 13, 2015 20:44
Simple pagination algorithm
// Implementation in ES6
function pagination(c, m) {
var current = c,
last = m,
delta = 2,
left = current - delta,
right = current + delta + 1,
range = [],
rangeWithDots = [],
l;
@chrissimpkins
chrissimpkins / gist:5bf5686bae86b8129bee
Last active December 21, 2025 20:02
Atom Editor Cheat Sheet: macOS

Use these rapid keyboard shortcuts to control the GitHub Atom text editor on macOS.

Key to the Keys

  • ⌘ : Command key
  • ⌃ : Control key
  • ⌫ : Delete key
  • ← : Left arrow key
  • → : Right arrow key
  • ↑ : Up arrow key
@stephensauceda
stephensauceda / gulpfile.babel.js
Created June 11, 2015 23:45
ES6 Gulpfile Example
/*
* Steps
* 1. Rename your gulpfile.js to gulpfile.babel.js
* 2. Add babel to your package.json (npm install -D babel)
* 3. Start writing ES6 in your gulpfile!
*/
import gulp from 'gulp'; // ES6 imports!
import sass from 'gulp-sass';
@chrisvanpatten
chrisvanpatten / readme.md
Last active July 31, 2024 13:35
Super-simple way to grab a few Instagram images and cache them w/ WordPress

This is an easy way to integrate a basic Instagram feed into a WordPress site.

Setup

First, register with Instagram's developer program, then register a client. Set the client ID they provide you in line 4.

Second, get your Instagram user ID by running this in your terminal:

curl -X GET https://api.instagram.com/v1/users/search\?q\=USERNAME\&client_id\=CLIENT_ID
@kgoggin
kgoggin / CalSync
Last active August 29, 2015 14:02
One-way sync two calendars within OS X Calendar app. In this case, used to move events from an Exchange account to an iCloud account.
property today : current date
property bfCal : "*NAME OF SOURCE CALENDAR*"
property iCal : "*NAME OF DESTINATION CALENDAR*"
-- used for Growl notification
property allNotifications : {}
tell application "Calendar" to launch
tell application "Calendar" to reload calendars
-- wait for reload to happen