Skip to content

Instantly share code, notes, and snippets.

View ValentinH's full-sized avatar

Valentin Hervieu ValentinH

View GitHub Profile
@ValentinH
ValentinH / Stylefile.yml
Created August 3, 2018 17:57
Customizations for www.ricardo.ch via StyleURL.
---
version: 1.0
domains:
- www.ricardo.ch
url_patterns:
- www.ricardo.ch/*
timestamp: '2018-08-03T17:57:07Z'
id: k5bL
redirect_url: https://www.ricardo.ch/fr/a/schoene-ohrstecker-1001262266/
shared_via: StyleURL - (https://www.styleurl.app) import and export CSS changes from
@ValentinH
ValentinH / Stylefile.yml
Created August 3, 2018 18:06
Customizations for www.ricardo.ch via StyleURL.
---
version: 1.0
domains:
- www.ricardo.ch
url_patterns:
- www.ricardo.ch/*
timestamp: '2018-08-03T18:06:21Z'
id: vts2
redirect_url: https://www.ricardo.ch/fr/a/schoene-ohrstecker-1001262266/
shared_via: StyleURL - (https://www.styleurl.app) import and export CSS changes from
function decryptBigIpCookie(cookieValue) {
const [ipPart, portPart] = cookieValue.split('.')
const hexIp = parseInt(ipPart, 10)
.toString(16)
.padStart(8, '0')
const ip1 = parseInt(hexIp.toString().substring(6, 8), 16)
const ip2 = parseInt(hexIp.toString().substring(4, 6), 16)
const ip3 = parseInt(hexIp.toString().substring(2, 4), 16)
const ip4 = parseInt(hexIp.toString().substring(0, 2), 16)
@ValentinH
ValentinH / named import VSCode snippet
Created January 2, 2021 13:54
VSCode snippet for named-import snippet
{
"Named import": {
"prefix": "ni",
"body": [
"import {$2} from '$1'"
],
"description": "Named import"
}
}
@ValentinH
ValentinH / queryTwitter.php
Created January 5, 2014 10:35
How to query Twitter search API in PHP. This example shows how to query a hashtag and get the top 100 more recent results. * require CURL.
function queryTwitter($search)
{
$url = "https://api.twitter.com/1.1/search/tweets.json";
if($search != "")
$search = "#".$search;
$query = array( 'count' => 100, 'q' => urlencode($search), "result_type" => "recent");
$oauth_access_token = "ABCD";
$oauth_access_token_secret = "1234";
$consumer_key = "abcd";
$consumer_secret = "5678";
// Menu: Meet
// Description: Start new meet and paste on Slack
// Author: Valentin Hervieu
// Twitter: @ValentinHervieu
import "@johnlindquist/kit"
async function sleep(time = 1000) {
return new Promise(resolve => setTimeout(resolve, time))
}
// Menu: Meet
// Description: Start new meet and paste on Slack
// Author: Valentin Hervieu
// Twitter: @ValentinHervieu
import "@johnlindquist/kit"
async function sleep(time = 1000) {
return new Promise(resolve => setTimeout(resolve, time))
}
// Menu: Meet
// Description: Start new meet and paste on Slack
// Author: Valentin Hervieu
// Twitter: @ValentinHervieu
import "@johnlindquist/kit"
async function sleep(time = 1000) {
return new Promise(resolve => setTimeout(resolve, time))
}
// Menu: Meet
// Description: Start new meet and paste on Slack
// Author: Valentin Hervieu
// Twitter: @ValentinHervieu
import "@johnlindquist/kit"
async function sleep(time = 1000) {
return new Promise(resolve => setTimeout(resolve, time))
}
// Menu: Meet
// Description: Start new meet and paste on Slack
// Author: Valentin Hervieu
// Twitter: @ValentinHervieu
import "@johnlindquist/kit"
async function sleep(time = 1000) {
return new Promise(resolve => setTimeout(resolve, time))
}