Skip to content

Instantly share code, notes, and snippets.

fn buildPathString(node) {
var path = ''
currentNode = node
while (currentNode.parent) {
if (currentNode.parent.left === currentNode) {
// the current node was to the left of its parent, meaning a "."
@ZeeCoder
ZeeCoder / reloadFacebookDashboard.js
Last active January 16, 2019 15:10
Facebook Dashboard Refresh
// Here You can type your custom JavaScript...
var onDashboard = location.href.indexOf('412279622274812/dashboard') !== -1;
if (onDashboard) {
var time = 10;
setTimeout(function() {
// scroll down to the graphs once the page loaded
var headerHeight = $('[data-click-area=biz_theme_header]').height() + $('[data-click-area=app_dash_header]').height()
var elementToScrollTo = document.querySelector('#developer_app_body > div > div:nth-child(2)');
window.scroll(0, elementToScrollTo.offsetTop - headerHeight);
@ZeeCoder
ZeeCoder / gist:664855aad71a67a686a1790ff3ca9193
Created December 14, 2018 12:18
Instagram Comment Scraper
javascript:(async()=>{const VERSION="2";const delay=n=>new Promise(resolve=>setTimeout(resolve,n));const startTime=new Date;const ui={view:{},state:{progress:"Loading...",rateLimit:"",csv:""},destroy:function(){const pastUI=document.querySelector("#EVENTSTAG-UI");if(pastUI){pastUI.parentElement.removeChild(pastUI)}},initialRender:function(){this.destroy();this.view.background=document.createElement("div");this.view.background.id="EVENTSTAG-UI";this.view.buttons=document.createElement("div");this.view.copyButton=document.createElement("button");this.view.copyButton.textContent="Copy CSV";this.view.closeButton=document.createElement("button");this.view.closeButton.textContent="Close";this.view.closeButton.onclick=(()=>this.destroy());this.view.csv=document.createElement("div");this.view.progress=document.createElement("div");this.view.rateLimit=document.createElement("div");this.view.csvInput=document.createElement("textarea");this.view.copyButton.onclick=(()=>{this.view.csvInput.focus();this.view.csvInput.sele
"""
::
Morph from source to destination face or
Morph through all images in a folder
Usage:
morpher.py (--src=<src_path> --dest=<dest_path> | --images=<folder>)
[--width=<width>] [--height=<height>]
[--num=<num_frames>] [--fps=<frames_per_second>]
This file has been truncated, but you can view the full file.
{
"flaggedPosts": {
"photo_booth_ny-pandora-3d-06-18_537_FRANKLIN-Surface4_2018-06-19-22-55-24_441478a2d3d93cd2335cb8740c649a1e_id": [
{
"date": "2018-07-12 17:07:06 -04:00",
"flag": "winner"
},
{
"date": "2018-07-12 17:07:07 -04:00",
"flag": "prize_412"
@ZeeCoder
ZeeCoder / bem.less
Last active October 22, 2017 15:41
BEM syntax guideline for LESS
.block {
@b: ~'.block';
&__element {
// ...
}
&--modifier {
// ...
@ZeeCoder
ZeeCoder / gist:7f3d51b7f3fa68889739
Last active May 6, 2016 23:33
Doctrine2: Get Random Entity
<?php
public function getRandomNewsArticles($n, $ignoredId = null) {
$idArray =
$this->em
->createQueryBuilder('na')
->select('na.id')
->add('from', '\App\Entity\NewsArticle na')
->getQuery()
->getScalarResult();