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
FROM debian:9 AS builder | |
RUN apt-get update && \ | |
apt-get install -y \ | |
build-essential \ | |
pkg-config \ | |
wget \ | |
tar \ | |
libltdl-dev \ | |
libpng-dev \ |
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
package main | |
import ( | |
"bufio" | |
"fmt" | |
"os" | |
"strings" | |
"github.com/rivo/uniseg" | |
) |
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
JSON.stringify(Object.fromEntries(Array.from(document.querySelectorAll('[data-permission-key]')).map(tr => { | |
let title = tr.querySelector('[class="title"]').innerText | |
let types = Object.fromEntries(Array.from(tr.querySelectorAll('[class="types"] dt')).map(dt => { | |
let sentence = dt.innerText | |
let next = dt.nextSibling | |
let values = (next !== null) ? [] : null | |
while (next !== null && next.tagName == "DD") { | |
values.push(next.innerText) | |
next = next.nextSibling | |
} |
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
#!/usr/bin/env bash | |
# Python virtualenvs contain references to base python | |
# For brew installed python they reference versioned Cellar | |
# Which breaks even on minor update | |
# This hacky script rewrites all those references to opt based, | |
# unversioned ones. | |
# | |
# Example usage: fixvenvopt.sh ~/.virtualenvs/jupyter | |
set -euo pipefail |
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
server { | |
server_name gram.com; | |
location / { | |
root /var/www/gram; | |
try_files $uri $uri/index.html; | |
# protect with basic auth, we don't want to get banned by rkn | |
auth_basic "webogram"; | |
auth_basic_user_file /var/www/gram.htpasswd; |
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 angularGet = name => angular.element(document).injector().get(name); | |
const _invokeApi = angularGet('MtpApiManager').invokeApi; | |
const saveApiChats = angularGet('AppChatsManager').saveApiChats; | |
const saveApiUsers = angularGet('AppUsersManager').saveApiUsers; | |
const getInputPeerByID = angularGet('AppPeersManager').getInputPeerByID; | |
const getChat = angularGet('AppChatsManager').getChat; | |
const getUser = angularGet('AppUsersManager').getUser; |
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
sudo apt update | |
# sudo apt upgrade | |
sudo apt install -y libcurl4-openssl-dev libplist-dev libzip-dev openssl libssl-dev libusb-1.0-0-dev libreadline-dev build-essential git make automake libtool pkg-config | |
git clone https://github.com/libimobiledevice/libirecovery | |
git clone https://github.com/libimobiledevice/idevicerestore | |
git clone https://github.com/libimobiledevice/usbmuxd | |
git clone https://github.com/libimobiledevice/libimobiledevice | |
git clone https://github.com/libimobiledevice/libusbmuxd | |
git clone https://github.com/libimobiledevice/libplist |
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
#!/usr/bin/env bash | |
set -euo pipefail | |
getlibs() { | |
otool -l "$1" |\ | |
(grep -A2 LC_LOAD_DYLIB || true) |\ | |
(grep name || true) |\ | |
awk '{ print $2 }' |\ | |
(grep '/usr/local' || true) | |
} |
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
#!/usr/bin/env bash | |
# See https://hub.zhovner.com/geek/universal-ikev2-server-configuration | |
# stek29 2018.11 | |
set -euxo pipefail | |
DOMAIN=tunnel.example.com | |
IPv4_NET="10.1.1.0/24" | |
IPv6_NET="2a01:cafe:babe:feed:face::/112" |
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
#undef UNICODE | |
#define UNICODE | |
#include <windows.h> | |
#include <stdio.h> | |
// i686-w64-mingw32-g++ -shared -o ExampleDll.dll example_dll.cpp -Wl,--out-implib,libExampleDll.dll -static -lgcc example_dll.def | |
// | |
// example_dll.def: | |
// EXPORTS | |
// RunDllMe=RunDllMe@16 |