Skip to content

Instantly share code, notes, and snippets.

var mediaJSON = { "categories" : [ { "name" : "Movies",
"videos" : [
{ "description" : "Big Buck Bunny tells the story of a giant rabbit with a heart bigger than himself. When one sunny day three rodents rudely harass him, something snaps... and the rabbit ain't no bunny anymore! In the typical cartoon tradition he prepares the nasty rodents a comical revenge.\n\nLicensed under the Creative Commons Attribution license\nhttp://www.bigbuckbunny.org",
"sources" : [ "http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/BigBuckBunny.mp4" ],
"subtitle" : "By Blender Foundation",
"thumb" : "images/BigBuckBunny.jpg",
"title" : "Big Buck Bunny"
},
{ "description" : "The first Blender Open Movie from 2006",
"sources" : [ "http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/ElephantsDream.mp4" ],
"clean": "lerna run clean",
"clean:examples": "find examples -name 'node_modules' -type d -prune -exec rm -rf '{}' +",
"clean:packages": "lerna clean -y",
"clean:examples:locks": "find examples -name 'yarn.lock' -type f -exec rm '{}' + && find examples -name 'package-lock.json' -type f -exec rm '{}' +",
"clean:packages:locks": "find packages -name 'yarn.lock' -type f -exec rm '{}' + && find packages -name 'package-lock.json' -type f -exec rm '{}' +",
"clean:plugins:locks": "find plugins -name 'yarn.lock' -type f -exec rm '{}' + && find plugins -name 'package-lock.json' -type f -exec rm '{}' +",
"clean:propagators:locks": "find propagators -name 'yarn.lock' -type f -exec rm '{}' + && find propagators -name 'package-lock.json' -type f -exec rm '{}' +",
"clean:main:locks": "rm -fr 'yarn.lock' && rm -fr 'package-lock.json'",
"clean:all": "npm run clean:packages:locks && npm run clean:examples:locks && npm run clean:main:locks && npm run clean && npm run clean:examples && npm ru
@obecny
obecny / youtube.js
Last active November 6, 2018 12:30
(function () {
'use strict';
var checked = 0;
var maxCheck = 10;
function play() {
checked = 0;
}
function remove() {
var e = document.querySelector('.yt-confirm-dialog-renderer a');
if (e) {
@obecny
obecny / index.js
Created August 21, 2018 10:04 — forked from mathisonian/index.js
postgres full text search in sequelize.js. see this blog post for more information http://www.mathisonian.com/weblog/postgres-full-text-search-with-sequelizejs
var Sequelize = require('sequelize');
module.exports = function(config) {
var models = {};
sequelize = new Sequelize(config.database, config.username, config.password, config.options);
// Bootstrap models
fs.readdirSync(__dirname).forEach(function (file) {
/^([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]|\-|\_){1,1}([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]|\ |\,|\.|\;|\'|\[|\]|\{|\}|\!|\@|\#|\$|\%|\&|\*|\(|\)|\-|\_|\=|\+?){0,49}$/i
#!/usr/bin/env bash
git fetch --prune
git branch -r | awk '{print $1}' | egrep -v -f /dev/fd/0 <(git branch -vv | grep origin) | awk '{print $1}' | xargs git branch -D
@obecny
obecny / pkp-intercity-lol.js
Created October 26, 2017 20:16 — forked from riggy/pkp-intercity-lol.js
Mirror pliku https://bilet.intercity.pl/irez/js/irez.js - dla funu i dla potomnych :D
// JavaScript Document
function escape_frame()
{
if (window != top)
{
alert(location.href);
top.location.href = location.href+'?checkJS=true';
}
}
//BEFORE
//working fine
//npm install [email protected] --save-dev
//broken
//npm install electron --save-dev
//NEEDED dependencies
//npm install xmldom --save-dev
//
// Regular Expression for URL validation
//
// Author: Diego Perini
// Updated: 2010/12/05
// License: MIT
//
// Copyright (c) 2010-2013 Diego Perini (http://www.iport.it)
//
// Permission is hereby granted, free of charge, to any person
@obecny
obecny / test.js
Last active August 29, 2015 14:18 — forked from Spoygg/test.js
describe('Test example.com', function(){
before(function(done) {
client.init().url('http://example.com', done);
});
describe('Check homepage', function(){
it('should see the correct title', function(done) {
client.getTitle(function(err, title){
expect(title).to.have.string('Example Domain');
done();