Skip to content

Instantly share code, notes, and snippets.

@danielsamson
danielsamson / .block
Last active August 21, 2018 14:57
d3-002
license: mit
@danielsamson
danielsamson / .block
Created August 21, 2018 14:52
d3-001
license: mit
ffmpeg -i video.mp4 -f image2 -bt 20M -vf fps=fps=10/60 -s 320x180 out/%03d.jpg
"use strict";
var gulp = require('gulp');
var connect = require('gulp-connect'); // Run a local dev server
var open = require('gulp-open'); // Opens in browser
var browserify = require('browserify'); // Bundles JS
var reactify = require('reactify'); // Transforms JSX to JS
var source = require('vinyl-source-stream'); // Use text streams with gulp
var concat = require('gulp-concat'); // concatinates files together
var eslint = require('gulp-eslint'); // Linter, inc JSX
var gulp = require('gulp');
var stylus = require('gulp-stylus');
var jeet = require('jeet');
var autoprefixer = require('gulp-autoprefixer');
var concat = require('gulp-concat');
var watch = require('gulp-watch');
var browserSync = require('browser-sync').create();
var reload = browserSync.reload;
// var sourcemaps = require('gulp-sourcemaps');
@danielsamson
danielsamson / gist:f34db00e771e609d4035
Created April 24, 2015 08:23
wordpress all to draft
UPDATE wp_posts SET post_status = 'draft' WHERE (post_type ='post' and post_status = 'publish') ;
@danielsamson
danielsamson / Media Library
Last active August 29, 2015 14:18
Wordpress SQL
DELETE FROM wp_postmeta
WHERE post_id IN
(
SELECT id
FROM wp_posts
WHERE post_type = 'attachment'
)
;
DELETE FROM wp_posts WHERE post_type = 'attachment'
# Get apache config file location
apache2ctl -V
sudo find / -name apache2.conf
/etc/init.d/apache2 reload
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>JS Bin</title>
</head>
<body>
<script id="jsbin-javascript">
var mapRange = function(val, inputStart, inputEnd, outputStart, outputEnd) {
# Your init script
#
# Atom will evaluate this file each time a new window is opened. It is run
# after packages are loaded/activated and after the previous editor state
# has been restored.
#
# An example hack to make opened Markdown files always be soft wrapped:
#
# path = require 'path'
#