Skip to content

Instantly share code, notes, and snippets.

Seph Soliman scarlac

Block or report user

Report or block scarlac

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
scarlac / server.js
Created May 1, 2019
File Upload Server
View server.js
const app = require('express')();
const upload = require('multer')();'/upload', upload.single('file'), function (req, res) {
console.log('file', req.file);
res.status(200).send(JSON.stringify({ ...req.file, buffer: null }));
app.listen(4242, () => { console.log('ready.'); });

Keybase proof

I hereby claim:

  • I am scarlac on github.
  • I am scarlac ( on keybase.
  • I have a public key ASDceRd1ij02J9C8XwWN-ACB7-7X7s6ipdnhzVa0J-csAgo

To claim this, I am signing this object:

scarlac /
Last active Oct 5, 2019
Facebook Hack: Purge list of "Advertisers you've interacted with"

For those of you who want to remove all in “Advertisers you’ve interacted with”:

  1. Go to and open the section "Advertisers you've interacted with"
  2. Open Web Inspector
  3. Copy-paste this script to load all advertisers: smt=setInterval(() => {let x=document.querySelector('div[shade=medium]'); x ? : clearInterval(smt), console.log('done')}, 1000)
  4. It will output a number. Wait for it to say “done” in the console. This may take a long time. you'll notice the scrollbar changing while it's loading all advertisers.
  5. Copy-paste this and press enter: document.querySelectorAll('[data-tooltip-content="Remove"]').forEach(el =>
scarlac / gist:777c070912e9fe90f1330d493591360f
Created Mar 25, 2018
Test of Slack link og:title escaping feature, tag here: <Slack>
View gist:777c070912e9fe90f1330d493591360f
Test of Slack link og:title escaping feature, tag here: <Slack>
scarlac / scandinavian-name-generator.js
Created Feb 9, 2018
"It seems like you could randomly generate Danish names using the formula of five letters, double consenant and an e at the end." - Challenge accepted.
View scandinavian-name-generator.js
const all = 'abcdefghijklmnopqrstuvwxyzæøå';
const consonants = 'bcdfghjklmnpqrstvwxz';
function randomLetter() {
return all[parseInt(Math.random() * all.length)];
function randomConsonant() {
return consonants[parseInt(Math.random() * consonants.length)];
scarlac / prototype-vs-arrowfn.js
Last active Dec 2, 2017
Benchmark comparison of 'clever' prototype trick vs arrow function call
View prototype-vs-arrowfn.js
const arr = [
' felis ',
' ex ',
' vitae ',
' tempus ',
' ut ',
' nec ',
scarlac / asyncawaitvspromises.js
Last active Nov 23, 2017
Async/await transpiled by hand to Promises
View asyncawaitvspromises.js
function add(a, b) {
return new Promise((resolve, reject) => {
resolve(a + b);
} // return promise
function multiply(x, y) {
return new Promise((resolve, reject) => {
resolve(x * y);
scarlac /
Last active Dec 23, 2016
FourSquare undocumented API

FourSquare is using API calls that are currently undocumented, yet seem quite interesting if you're integrating with it. Specifically, Documentation on oking a venue has been left out. Like, dislike and their undo counterparts are documented.

Here are the calls needed to rate a FourSquare venue:

Like Venue


| Param | Type | Description |


Keybase proof

I hereby claim:

  • I am scarlac on github.
  • I am scarlac ( on keybase.
  • I have a public key ASA1YXEj0Dqd_4QlPt5BVll7v-5FmQQ2kxSeA-XPVzBmzAo

To claim this, I am signing this object:

View gist:6793066
#!/usr/bin/env node
var path = require('path'),
fs = require('fs'),
sys = require('util'),
os = require('os'),
exec = require('child_process').exec,
You can’t perform that action at this time.