Skip to content

Instantly share code, notes, and snippets.


Andrea Collet ifthenelse

Block or report user

Report or block ifthenelse

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
ifthenelse / webvideo.zsh
Created Nov 16, 2018
Create compressed versions of video in mp4 and webm formats using zsh and ffmpeg
View webvideo.zsh
#!/bin/env zsh
# create webm and mp4 web version of video
webvideo() {
if [ -z "$1" ]; then
printf "\Video source not set\n"
exit 1
ifthenelse / wordpress-docker.sublime-project
Created Sep 26, 2018
View wordpress-docker.sublime-project
"folders": [
"file_exclude_patterns": [
ifthenelse / jquery.getTransitionDuration.js
Last active Sep 4, 2018 — forked from mandelbro/jQuery-transitionend
Quick jQuery plugin to get the duration of a CSS transition for an element. Support multiple transition values
View jquery.getTransitionDuration.js
* jQuery.getTransitionDuration
* A jQuery plugin to get transition-duration in milliseconds
* Works with multiple values and supports all browser vendor prefixes
* Usage with single transition-duration values $(div).getTsDuration()
* Usage with multiple transition-duration values $(div).getTsDuration("opacity") (otherwise would return the first)
* Based on a gist by Chris Montes
ifthenelse / jQuery_plugin_UMD_boilerplate.js
Last active Jul 19, 2018
Boilerplate for jQuery plugin with UMD wrapper and requiremetn of external dependencies (in this case 'moment' and 'moment-timezone')
View jQuery_plugin_UMD_boilerplate.js
(function(factory) {
if (typeof define === 'function' && define.amd) {
// AMD. Register as an anonymous module.
define(['jquery', 'moment', 'moment-timezone'], factory);
} else if (typeof module === 'object' && module.exports) {
// Node/CommonJS
module.exports = function(root, jQuery, moment) {
if (jQuery === undefined) {
// require('jQuery') returns a factory that requires window to
// build a jQuery instance, we normalize how we use modules
ifthenelse / Dynamic grid layout in SASS
Created Jun 27, 2017
Programmatically stack SASS breakpoints in a json-like structure and use them to create a grid system layout
View Dynamic grid layout in SASS
$smallphone: 480px;
$phone: 640px;
$tablet: 768px;
$desktop: 1024px;
$wide: 1440px;
// Grid breakpoints map
$breakpoints: (small: null, medium: "screen and (min-width: 768px)", large: "screen and (min-width: 1440px)");
// Non-grid breakpoints map
View nodejs_aliases.bash_profile
alias nom='npm cache clean && rm -rf node_modules && mkdir node_modules && tmutil addexclusion $(pwd)/node_modules && touch node_modules/.metadata_never_index && npm install'
alias bom='bower cache clean && rm -rf bower_components && mkdir bower_components && tmutil addexclusion $(pwd)/bower_components && touch bower_components/.metadata_never_index && bower install'
ifthenelse / riepilogo.html
Created Jun 9, 2016
Header riepilgoo checkout
View riepilogo.html
<section class="shop-checkout--cart section-without-vertical-margin layout-grid is-active">
<div class="row">
<div class="col small-12 medium-8 medium-shift-2 large-6 large-shift-3">
<header class="shop-checkout--cart--header">
<h2>Riepilogo ordini</h2>
<article id="cart-item-riso" class="shop-checkout--cart-item">
<div class="shop-checkout--cart-item--info riepilogo">
<p class="shop-checkout--cart-item--name bentonsanslight__big uppercase">
<span class="bentonsansbold">5 x</span> <a href="/shop-categoria.html" title="Riso" target="_self" class="shop-checkout--cart-item--link">Riso</a>
ifthenelse / stili.css
Last active Apr 5, 2016
Stili di prova per adattamento mobile della newsletter
View stili.css
<style type="text/css">
.bentonsansbook {
font-family: "Benton Sans Book", Verdana, "Helvetica Neue", Helvetica, "Trebuchet MS", Arial;
font-style: normal;
font-weight: normal;
color: #0e0e0e;
.bentonsanslight {
font-family: "Benton Sans Light", Verdana, "Helvetica Neue", Helvetica, "Trebuchet MS", Arial;
ifthenelse /
Last active Mar 16, 2016
Aliases collection for Symfony 2
# If superuser warn and prompt to continue
prompt_exec_as_root () {
if [[ `whoami` = 'root' -o $(id -u) == 0 -a -z "$SUDO_COMMAND" ]]; then
/bin/echo "Warning: you're running the script as superuser.";
/bin/echo "This may cause directory permission issues and you'll probably be unable to access your files anymore. \nIn malmost all the cases you're adviced to run as regular user."
/bin/echo "Do you still want to continue? [Yes/No/Abort] (default: No) "
read REPLY;
else if [[ ! $REPLY -o $REPLY =~ ^[Nn][Oo]?$ -o $REPLY =~ ^[Aa]([Bb][Oo][Rr][Tt])?$ ]]; then
ifthenelse / retroarch_20160131-180023.txt
Created Jan 31, 2016
Libretro Retroarch dumpfile on 2016/01/31 at 6:00:23 PM
View retroarch_20160131-180023.txt
RetroArch [INFO] :: === Build =======================================RetroArch [INFO] :: [CPUID]: Features:
RetroArch [INFO] :: Version: 1.3.0
RetroArch [INFO] :: Git: 97e0c86
RetroArch [INFO] :: =================================================
RetroArch [INFO] :: [CPUID]: Features:
RetroArch [INFO] :: Looking for config in: "/storage/.config/retroarch/retroarch.cfg".
RetroArch [INFO] :: Config: loading config from: /storage/.config/retroarch/retroarch.cfg.
RetroArch [INFO] :: Threaded rarch_task started
RetroArch [INFO] :: Loading dynamic libretro core from: "/tmp/cores/"
RetroArch [INFO] :: Environ SET_VARIABLES.
You can’t perform that action at this time.