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
/** | |
* Apply to Symbol.iterator on object to enable iteration | |
* | |
* @param field values, keys, entries | |
* | |
* @return {Function} | |
*/ | |
function ObjectIteraror(field) { | |
if (!['keys', 'values', 'entries'].includes(field)) { | |
throw new Error('Incorrect field value, available values: keys, values, entries'); |
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
#!/usr/bin/env sh | |
sudo apt install \ | |
libxslt1-dev \ | |
libtidy-dev \ | |
libpng-dev \ | |
libcurl4-gnutls-dev \ | |
libmcrypt-dev \ | |
libjpeg-dev \ | |
libbz2-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
#!/usr/bin/env python | |
from __future__ import print_function | |
import os | |
import re | |
import sys | |
import shutil | |
import subprocess | |
def main(): |
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
#!/usr/bin/env bash | |
SOURCE="$1" | |
# x264 | |
ffmpeg -i "$SOURCE" -y -c:a aac -c:v libx264 -ac 2 -ar 44100 -b:a 96k -b:v 768k "${SOURCE/%.*/-html5-x264.mp4}" > /dev/null 2>&1 & | |
# x265 | |
ffmpeg -i "$SOURCE" -y -c:a aac -c:v libx265 -ac 2 -ar 44100 -b:a 96k -b:v 768k "${SOURCE/%.*/-html5-x265.mp4}" > /dev/null 2>&1 & |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
// Santa Elena: [-70.053958306885, -32.838484653423] | |
var lc = db.Places.findOne({ name: "Cerro La Cruz" }, { _id: false, location: true }); | |
db.Places.aggregate([ | |
{ "$geoNear": { | |
"near": { | |
"type": "Point", | |
"coordinates": lc.location.coordinates, | |
}, |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<title>Snake</title> | |
</head> | |
<body> | |
<canvas id="snake" width="400" height="400"></canvas> | |
<script type="text/javascript"> | |
(function (window, document) { |
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
<script> | |
export default { | |
name: 'InfiniteScroll', | |
template: '<div ref="el" style="height: 0;"> </div>', | |
props: { | |
offset: { | |
type: Number, | |
default: 300, |
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
#!/usr/bin/env bash | |
# @author: Jesús Urrutia <[email protected]> | |
# @description: Detect last project working on projects folder and create time entry in harvest | |
# Require create .harvestrc file on your home folder with: | |
# HARVEST_ACCOUNT_ID=234234234 | |
# HARVEST_ACCESS_TOKEN=2tbetetnseys4563w525j98356tyoiwurkisgknswnervhmia8j4v56uo8werybwu | |
# Require create .harvest file on root folder project with: |
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
CREATE TABLE IF NOT EXISTS layers ( | |
id INT unsigned NOT NULL auto_increment, | |
name VARCHAR(255) NOT NULL, | |
PRIMARY KEY(id) | |
); | |
CREATE TABLE IF NOT EXISTS tags ( | |
id INT unsigned NOT NULL auto_increment, | |
name VARCHAR(255) NOT NULL, | |
PRIMARY KEY(id) |