Skip to content

Instantly share code, notes, and snippets.

View WillsonSmith's full-sized avatar

Willson Smith WillsonSmith

View GitHub Profile
@WillsonSmith
WillsonSmith / moveScreenshots.rb
Created July 11, 2015 19:43
Small script to move screenshots from your desktop to a "screens" folder (mac)
require "fileutils"
##moves files including "Screen Shot" to a temp folder
PATH = ARGV[0] ? ARGV[0] : Dir.home() + "/desktop"
TEMP_FOLDER = "screens"
Dir.chdir(PATH)
Dir.mkdir(TEMP_FOLDER) unless Dir.exists?("#{PATH}/#{TEMP_FOLDER}")
FileUtils.mv Dir.glob("Screen Shot*.png"), TEMP_FOLDER
puts ["all finished 😊", "bye bye screenshots! 👋", "nice clean desktop! 💻"].sample
@WillsonSmith
WillsonSmith / inheritedCalculator.js
Last active August 29, 2015 14:18
do the more maths from base
(function() {
"use strict";
var assign = require("lodash.assign"),
mathPrototype = {
total: 0,
add: function add(number) {
@WillsonSmith
WillsonSmith / calculate.js
Created April 6, 2015 17:38
do the maths
(function() {
"use strict";
var calculatorPrototype = {
total: 0,
add: function add(number) {
@WillsonSmith
WillsonSmith / gulpfile.js
Created March 26, 2015 14:59
gulpfile for es6 transpiling with babeljs
var gulp = require("gulp");
var babel = require("gulp-babel");
var sourcemaps = require("gulp-sourcemaps");
gulp.task("default", function () {
return gulp.src("es6.js")
.pipe(babel())
.pipe(gulp.dest("dist"));
});
function checkIfNew(tagName, cb) {
"use strict";
var nodeList = document.getElementsByTagName(tagName);
var tempList = [].slice.call(nodeList);
function conditional() {
var tempLength = tempList.length,
nodeLength = nodeList.length,

Keybase proof

I hereby claim:

  • I am WillsonSmith on github.
  • I am willson (https://keybase.io/willson) on keybase.
  • I have a public key whose fingerprint is 2B19 85F6 768C 3D27 AD37 A65B 0533 4FB0 0C20 304F

To claim this, I am signing this object:

@WillsonSmith
WillsonSmith / ScreenShot.rb
Created August 14, 2014 23:06
Move screenshots from whatever directory you are currently in into a temp folder. (ie, "cd ~/desktop" "ruby ScreenShot.rb")
require 'fileutils'
files = Dir.glob "*.png"
files = files.map { |file| [file.count("?/"), file] }
files = files.sort.map { |file| file[1] }
files.each do |file|
rena = file.include? 'Screen Shot'
dchk = 'temp'
if rena
(function(){
'use strict';
var c = document.getElementById('container');
var start,
move,
end;
c.addEventListener('touchstart', function(e){
[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]][([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+[]]+([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]]((![]+[])[+!+[]]+(![]+[])[!+[]+!+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]+(!![]+[])[+[]]+(![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+
@WillsonSmith
WillsonSmith / ScreenShot.rb
Created October 29, 2013 04:19
Move all screenshots (Mac) from desktop into a temporary (tmp) folder.
require 'fileutils'
files = Dir.glob "*.png"
files = files.map { |file| [file.count("?/"), file] }
files = files.sort.map { |file| file[1] }
files.each do |file|
rena = file.include? 'Screen Shot'
dchk = 'temp'
if rena