Skip to content

Instantly share code, notes, and snippets.

View juliocesar's full-sized avatar

Julio Cesar Ody juliocesar

View GitHub Profile
juliocesar / calc-sapisidhash.js
Created May 11, 2023 17:02 — forked from eyecatchup/calc-sapisidhash.js
View calc-sapisidhash.js
async function getSApiSidHash(SAPISID, origin) {
function sha1(str) {
return window.crypto.subtle.digest("SHA-1", new TextEncoder("utf-8").encode(str)).then(buf => {
return Uint8Array(buf), x=>(('00'+x.toString(16)).slice(-2))).join('');
const digest = await sha1(`${TIMESTAMP_MS} ${SAPISID} ${origin}`);
juliocesar /
Created November 21, 2019 01:53


Sort of, but not quite.

NSDAP (the Nazi Party) won a plurality of seats in the Reichstag (Parliament), but was unable to form a majority government because the Communists won the second-greatest number of seats, and while neither party won a majority, they collectively won enough seats for neither one to be able to muster enough support from the other parties to form a working majority.

I don't remember the exact details (I'm sure someone else can elaborate), but basically the Nazis did their best to paralyze the government. Eventually, there was an alleged terrorist attack (actually staged by the Nazis themselves) that convinced (independent) President Hindenburg to name Hitler as "Chancellor" in exchange for the Nazis agreeing to form a coalition government with other parties. At the time, Chancellor was a largely symbolic and ceremonial role.

The Nazis then did what would, in computer security terms, be classified as a complex m

juliocesar / color.scss
Last active August 3, 2016 05:45
Color palette implementation in Sass
View color.scss
// Color scale function
// ====================
// Similarly to dirg, this assists with creating rhythmic colour
// variations from a palette. The definition of the $color-palette var
// is made at build time.
// Granularity of variations.
$step-size: 7.5% !default;
juliocesar / gist:ebb658162370d2482d5520ea7a8581c7
Created June 8, 2016 03:26
Shell function for converting videos into GIFs.
View gist:ebb658162370d2482d5520ea7a8581c7
gifify() {
if [[ -n "$1" ]]; then
if [[ $2 == '--good' ]]; then
ffmpeg -i $1 -r 21 -vcodec png out-static-%05d.png
time convert -verbose +dither -layers Optimize -resize 50% out-static*.png GIF:- | gifsicle --colors 256 --delay=5 --loop --optimize=3 --mul
tifile - > $1.gif
rm out-static*.png
ffmpeg -i $1 -s 600x400 -pix_fmt rgb24 -r 10 -f gif - | gifsicle --optimize=3 --delay=3 > $1.gif
juliocesar / velocity-animate.jsx
Last active August 29, 2015 14:25
A component for doing child transitions using Velocity.js
View velocity-animate.jsx
// Velocity Animate
// ================
// Inspired by
// Extend so it supports:
// 1) A transition object in the same format as the ones in the library below,
// directly to the component. Example:
juliocesar / .eslintrc
Last active September 3, 2015 05:48
Ok Build - a build system that's ok, as far as build systems go
View .eslintrc
"ecmaFeatures": {
"globalReturn": true,
"jsx": true,
"modules": true
"env": {
"browser": false,
"es6": true,
juliocesar / vsjsonp.js
Last active August 8, 2016 03:50
Very simple JSONP
View vsjsonp.js
// VSJONP ― Very Simple JSONP
// ==========================
// Usage:
// fetchJsonP({
// url: 'http://shit-no-cors.json',
// complete: function(response) {
// console.log(response);
// }
// });
juliocesar / catalanifyme.js
Last active August 29, 2015 14:08
View catalanifyme.js
// Catalanify-me dot jay ass
// =========================
// Replaces all copy in your website with that famous sentence from an Adam
// Sandler film, "I'm here for the beer and the britches" (or was it something
// else? I can't remember…) said in Catalanese.
// Instalation:
// At some point in the page, load this script and run:
juliocesar / gist:9b728487ae4709f8f265
Created July 2, 2014 00:55
My ST2 configuration
View gist:9b728487ae4709f8f265
"caret_style": "phase",
"color_scheme": "Packages/Theme - Tech49/Tech49.tmTheme",
"ensure_newline_at_eof_on_save": true,
juliocesar / gist:11162250
Last active August 29, 2015 14:00
Macbook Pro (Retina, mid 2012)
View gist:11162250

15" Macbook Pro (Retina, mid 2012)


I'm selling my Macbook Pro Retina (mid 2012). This machine has served me well in many battles. It has witnessed me unleash the fury of a thousand suns while building many Internets around the world.

The specs:

  • Display: 15" Retina display.
  • Processor: 4 cores 2.3GHz Intel Core i7.