Skip to content

Instantly share code, notes, and snippets.

View 1Conan's full-sized avatar

Conan 1Conan

View GitHub Profile
@1Conan
1Conan / pallas.sh
Created July 8, 2020 14:28 — forked from Siguza/pallas.sh
newstyle OTA
#!/bin/zsh
set -e;
dir="$(mktemp -d)";
echo "$dir" >&2;
iOS_device=();
iOS_model=();
@1Conan
1Conan / snowflake-id.sql
Created June 13, 2020 12:35 — forked from beginor/snowflake-id.sql
Twitter Snowflake ID for PostgreSQL
CREATE SEQUENCE public.global_id_seq;
ALTER SEQUENCE public.global_id_seq OWNER TO postgres;
CREATE OR REPLACE FUNCTION public.id_generator()
RETURNS bigint
LANGUAGE 'plpgsql'
AS $BODY$
DECLARE
our_epoch bigint := 1314220021721;
seq_id bigint;
@1Conan
1Conan / delete-all-messages.js
Created March 9, 2019 16:12 — forked from IMcPwn/delete-all-messages.js
Delete all messages in a Discord channel
// Turn on Developer Mode under User Settings > Appearance > Developer Mode (at the bottom)
// Then open the channel you wish to delete all of the messages (could be a DM) and click the three dots on the far right.
// Click "Copy ID" and paste that instead of LAST_MESSAGE_ID.
// Copy / paste the below script into the JavaScript console.
// If you're in a DM you will receive a 403 error for every message the other user sent (you don't have permission to delete their messages).
var before = 'LAST_MESSAGE_ID';
clearMessages = function(){
const authToken = document.body.appendChild(document.createElement`iframe`).contentWindow.localStorage.token.replace(/"/g, "");
const channel = window.location.href.split('/').pop();
@1Conan
1Conan / nginx-ssl.conf
Last active March 13, 2016 15:13
Configuration to get an A+ on the Qualys SSL Labs test with fast performing and low overhead SSL ciphers. Works in combination with nginx 1.9.8 full and OpenSSL v1.0.2d.
#NOTES
# http2 works only if you compiled nginx with "--with-http_v2_module"!
# If you need help on compiling nginx with http2 please refer to this link
# https://www.m00nie.com/2015/01/install-nginx-and-pagespeed/
#www to root redirect
server {
listen 80;
listen [::]:80;
listen 443 ssl http2;