Skip to content

Instantly share code, notes, and snippets.

View eduwass's full-sized avatar
❄️
working remotely

Edu Wass eduwass

❄️
working remotely
View GitHub Profile
@cassus
cassus / Dev platform settings
Created November 1, 2016 14:54
Zapier app to read Activity and Sleep data from FitBit
## Triggers (Bringing data into Zapier)
### Sleep - polling
https://api.fitbit.com/1/user/-/sleep/date/today.json
### Activity - polling
https://api.fitbit.com/1/user/-/activities/list.json?beforeDate=today&sort=desc&limit=10&offset=0
## Scripting API
see script.js
@vbuck
vbuck / gist:ee728c235f258d99552000c463c41e6b
Created October 18, 2016 20:34
WP Smush "Bulk Smush Pusher"
// Execute in your console while WP Smush is open to bulk smush in intervals of 50 automatically
var smushTimer = setInterval( function() { !jQuery('.wp-smush-button').attr('disabled') ? jQuery('.wp-smush-button').click() : console.log('smush-check'); }, 3000);
@iammerrick
iammerrick / PinchZoomPan.js
Last active April 22, 2024 02:54
React Pinch + Zoom + Pan
import React from 'react';
const MIN_SCALE = 1;
const MAX_SCALE = 4;
const SETTLE_RANGE = 0.001;
const ADDITIONAL_LIMIT = 0.2;
const DOUBLE_TAP_THRESHOLD = 300;
const ANIMATION_SPEED = 0.04;
const RESET_ANIMATION_SPEED = 0.08;
const INITIAL_X = 0;
@eduwass
eduwass / commands.md
Last active December 21, 2016 13:50
Docker cheatsheet

Stop / remove all Docker containers

docker stop $(docker ps -a -q)
docker rm $(docker ps -a -q)

Remove dangling Docker images

docker rmi $(docker images -q -f dangling=true)
@Val
Val / build_rest-like_api.rb
Created January 19, 2016 14:28
Token protected REST-like API using Grape, Swagger on top of Rails. Based on http://www.toptal.com/ruby/grape-gem-tutorial-how-to-build-a-rest-like-api-in-ruby/
# -*- mode:ruby;tab-width:2;indent-tabs-mode:nil;coding:utf-8 -*-
# vim: ft=ruby syn=ruby fileencoding=utf-8 sw=2 ts=2 ai eol et si
#
# build_rest-like_api.rb: sample REST-like API server
# (c) 2016 Laurent Vallar <val@zbla.net>, WTFPL license v2 see below.
#
# This program is free software. It comes without any warranty, to
# the extent permitted by applicable law. You can redistribute it
# and/or modify it under the terms of the Do What The Fuck You Want
# To Public License, Version 2, as published by Sam Hocevar. See
@MoOx
MoOx / isDblTouchTap.js
Last active April 30, 2023 19:28
Double touch tap workaround for React based on onTouchTap (react-tap-event-plugin)
const dblTouchTapMaxDelay = 300
let latestTouchTap = {
time: 0,
target: null,
}
export default function isDblTouchTap(event) {
const touchTap = {
time: new Date().getTime(),
target: event.currentTarget,
@eduwass
eduwass / 0. Custom Date Formats in Rails.md
Last active June 7, 2021 22:32
Custom Date Formats in Rails

Custom Date Formats in Rails

Quick guide on printing pretty dates in Rails

@cfxd
cfxd / gulp_module_installation
Last active January 29, 2019 20:04
Gulpfile and module installation for UnCSS + Gulp + Sage 8.3.0
$ npm install gulp-uncss gulp-exec --save-dev
@vburlak
vburlak / vc2twbs3classes
Last active April 29, 2020 15:24
Replace Visual Composer initial classes with original Bootstrap 3 classes
/**
* Replace Visual Composer initial classes with original Bootstrap 3 classes
*
* @author http://codecanyon.net/user/adambartholomew1
* @source from http://pastebin.com/qJp9SXvP
* @package vc2twbs3classes
* @version 0.1
*/
$lCounter = 0;