Skip to content

Instantly share code, notes, and snippets.

View samuel-sobrino's full-sized avatar

samuel-sobrino

  • Geneva, Switzerland
View GitHub Profile
@samuel-sobrino
samuel-sobrino / gist:c9a55442b4e6ac335c3395c6b958c09c
Created March 22, 2018 14:46
Google Contacts API v3 Javascript sample
<html>
<head>
<script src="https://apis.google.com/js/client.js"></script>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.10.1/jquery.min.js"></script>
<script>
function auth() {
var config = {
'client_id': 'OAUTH_CLIENT_ID',
'scope': 'https://www.google.com/m8/feeds'
};
<p>I am inline text</p>
<p>I am literal html code </p>
<p>
Hello World!
I am Pug, your buddy to write simple HTML templates.<em>Let's explore the world, shall we?</em>Very nice to meet you :)
</p>
<p>
Hello World!
I am Pug, your buddy to write simple HTML templates.
@samuel-sobrino
samuel-sobrino / toDataUrl.js
Created April 17, 2018 11:20 — forked from HaNdTriX/toDataUrl.js
Example of converting a file to a dataURL in ES6
const toDataURL = url => fetch(url)
.then(response => response.blob())
.then(blob => new Promise((resolve, reject) => {
const reader = new FileReader()
reader.onloadend = () => resolve(reader.result)
reader.onerror = reject
reader.readAsDataURL(blob)
}))
@samuel-sobrino
samuel-sobrino / js-exif-rotate.html
Created April 22, 2018 06:09 — forked from runeb/js-exif-rotate.html
Auto-rotate images locally in the browser by parsing exif data
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>
<input id="file" type="file" accept="image/*" />
<br/>
<h2>As read:</h2>
<img id="placeholder1" width=300/><br/>
<h2>Rotated by exif data:</h2>
<img id="placeholder2" width=300/>
<script>
@samuel-sobrino
samuel-sobrino / Clone-Github-Wiki-Pages.sh
Last active February 19, 2019 10:14 — forked from hanxue/Clone-Github-Wiki-Pages.sh
Cloning Github Wiki Pages
Voici comment faire un clone des pages wiki de git
hanxue-mac:Github hanxue$ git clone https://github.com/AppScale/appscale.wiki.git
Cloning into 'appscale.wiki'...
remote: Counting objects: 1745, done.
remote: Compressing objects: 100% (1733/1733), done.
remote: Total 1745 (delta 1089), reused 10 (delta 4)
Receiving objects: 100% (1745/1745), 267.93 KiB | 35.00 KiB/s, done.
Resolving deltas: 100% (1089/1089), done.
Checking connectivity... done
@samuel-sobrino
samuel-sobrino / gist:734ace9597ba66b6ae7369029e662743
Created March 27, 2019 12:26 — forked from discordier/gist:ed4b9cba14652e7212f5
options for phpStorm @noinspection annotation
javascript
ES6ValidationInspection
JSAccessibilityCheckInspection
JSBitwiseOperatorUsageInspection
JSCheckFunctionSignaturesInspection
JSClosureCompilerSyntaxInspection
JSCommentMatchesSignatureInspection
JSComparisonWithNaNInspection
JSConsecutiveCommasInArrayLiteralInspection
@samuel-sobrino
samuel-sobrino / decrypt_dbeaver.py
Created November 13, 2023 14:17 — forked from felipou/decrypt_dbeaver.py
DBeaver password decryption script - for newer versions of DBeaver
# https://stackoverflow.com/questions/39928401/recover-db-password-stored-in-my-dbeaver-connection
# requires pycryptodome lib (pip install pycryptodome)
import sys
import base64
import os
import json
from Crypto.Cipher import AES