This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var iiii = 0; | |
function increment() { | |
iiii += 1; | |
} | |
function createActionsInit() { | |
function removeElement(parentDiv, childDiv){ | |
if (childDiv == parentDiv) return | |
if (document.getElementById(childDiv)) { | |
var child = document.getElementById(childDiv); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
PHANTOM_JS="phantomjs-1.9.8-linux-x86_64" | |
if [[ $EUID -ne 0 ]]; then | |
echo "You must be a root user" 2>&1 | |
exit 1 | |
else | |
apt-get update | |
apt-get install -y build-essential chrpath libssl-dev libxft-dev | |
apt-get install -y libfreetype6 libfreetype6-dev | |
apt-get install -y libfontconfig1 libfontconfig1-dev |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var o = [ | |
{created:1356036198452 , val:'1356036198452 '}, | |
{created:1356039026690, val:'1356039026690'}, | |
{created:1356039067568, val:'1356039067568'}, | |
{created:1356035166411, val:'1356035166411'} | |
] | |
function newestToOldest(a,b) { | |
if (a.created < b.created) | |
return 1; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// simple static server | |
let express = require('express'), | |
app = express(), | |
// favicon = require('serve-favicon'), | |
bodyParser = require('body-parser'); | |
// content directory(ies) | |
app.use(express.static('public')); | |
// app.use(favicon(path.join(__dirname, 'public', 'favicon.ico'))) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var file = $('#filesToUpload').get(0).files[0]; | |
if (!file) { | |
alert('no file'); | |
return; | |
}; | |
var o = {}; | |
o.category = cat; | |
o.name = 'some file'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
swagger: 2 | |
info: | |
title: The new Uber API | |
description: Move your app forward with the Uber API | |
version: "1.0.0" | |
host: api.uber.com | |
schemes: | |
- https | |
basePath: /v1 | |
produces: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# This script will take an animated GIF and delete every other frame | |
# Accepts two parameters: input file and output file | |
# Usage: ./<scriptfilename> input.gif output.gif | |
# Make a copy of the file | |
cp $1 $2 | |
echo "copy completed" | |
# Get the number of frames | |
numframes=`gifsicle $1 -I | grep -P "\d+ images" --only-matching | grep -P "\d+" --only-matching` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# This script will take an animated GIF and delete every other frame | |
# Accepts two parameters: input file and output file | |
# Usage: ./<scriptfilename> input.gif output.gif | |
# Make a copy of the file | |
cp $1 $2 | |
echo "copy completed" | |
# Get the number of frames | |
numframes=`gifsicle $1 -I | grep -P "\d+ images" --only-matching | grep -P "\d+" --only-matching` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<head> | |
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> | |
<title></title> | |
<meta name='DC.title' content=''> | |
<meta name='subtitle' content='This is my subtitle'> | |
<meta name='url' content=''> | |
<meta name='identifier-URL' content=''> | |
<meta name='reply-to' content='email@mail.com'> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function monthDiff(d1, d2) { | |
var months; | |
months = (d2.getFullYear() - d1.getFullYear()) * 12; | |
months -= d1.getMonth() + 1; | |
months += d2.getMonth(); | |
return months <= 0 ? 0 : months; | |
} |