![]() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const lib = require('lib')({token: process.env.STDLIB_SECRET_TOKEN}); | |
const {createHmac} = await import('crypto'); | |
const safeCompare = require('safe-compare'); | |
// Expo request signature check | |
const hmac = createHmac('sha1', process.env.SECRET_WEBHOOK_KEY); | |
hmac.update(Buffer.from(JSON.stringify(context.params))); | |
const hash = `sha1=${hmac.digest('hex')}`; | |
console.log('context.params', context.params) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
httpsServer := &http.Server{ | |
Handler: http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { | |
hj, isHJ := w.(http.Hijacker) | |
if r.Header.Get("Upgrade") == "websocket" && isHJ { | |
c, br, err := hj.Hijack() | |
if err != nil { | |
log.Printf("websocket websocket hijack: %v", err) | |
http.Error(w, err.Error(), 500) | |
return | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# taken from here: | |
# https://www.reddit.com/r/Piracy/comments/4kn6rq/comprehensive_guide_to_blocking_ads_on_spotify/ | |
0.0.0.0 adclick.g.doublecklick.net | |
0.0.0.0 adeventtracker.spotify.com | |
0.0.0.0 ads-fa.spotify.com | |
0.0.0.0 analytics.spotify.com | |
0.0.0.0 audio2.spotify.com | |
0.0.0.0 b.scorecardresearch.com | |
0.0.0.0 bounceexchange.com | |
0.0.0.0 bs.serving-sys.com |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
iex ((new-object net.webclient).DownloadString('https://chocolatey.org/install.ps1')) | |
choco install ruby -y | |
choco install ruby2.devkit -y | |
$env:PATH = [System.Environment]::GetEnvironmentVariable("PATH", "Machine") | |
$env:Path += ";$env:ChocolateyBinRoot\ruby23\bin" | |
cd "$($env:ChocolateyInstall)\helpers\functions" |