Skip to content

Instantly share code, notes, and snippets.

View Wsine's full-sized avatar
:octocat:
Feel free to contact me

Jankin Wei Wsine

:octocat:
Feel free to contact me
View GitHub Profile
@rozboris
rozboris / yt-hide-shorts.user.js
Last active June 20, 2023 08:11
Hide Shorts on YouTube
// ==UserScript==
// @name Hide Shorts on YouTube
// @version 4
// @description Hides vides with #shorts tag or the ones shorter than 1 minute on Youtube Subscriptions and Home page
// @author rozboris
// @include https://*.youtube.com/*
// @include https://youtube.com/*
// @grant GM_addStyle
// @updateURL https://gist.githubusercontent.com/rozboris/f0a4fcd087fe23c198a37c0654af1afc/raw/yt-hide-shorts.user.js
// ==/UserScript==
@harrisjose
harrisjose / [token].js
Created August 20, 2021 15:13
Telegram bot using Next.js API Routes
import Cors from 'micro-cors'
import got from 'got'
import { format } from 'date-fns'
import { isEmpty, makeYaml } from 'utils'
const getContent = (message) => {
let { entities, text } = message
// Get url for the note
let urlEntity = entities.find((e) => e.type === 'url')
@wlib
wlib / LICENSE
Last active April 30, 2024 17:07
Run a shell script with bash, line-by-line, prompted on each command. Useful for running unknown scripts or debugging. Not a secure substitute for understanding a script beforehand.
MIT License
Copyright (c) 2021 Daniel Ethridge
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
@colemickens
colemickens / amiibo-emulation-with-linux-vm.md
Last active March 23, 2024 03:37
amiibo-emulation-with-linux-vm.md

Easy Amiibo Emulation - https://bit.ly/2z0m09k

(^ that's a short-link to this page, so you can open it in Linux)

Some users are discussing this guide in #hacking on the JoyConDroid Discord: https://discord.gg/SQNEx9v.

DO NOT ask for, or share links to, Amiibo bins in the comments! They will be removed. Thank you for understanding.

(Windows|Linux PC) + JoyControl + Bluetooth = AMIIBO EMULATION

@mayneyao
mayneyao / notion2blog.js
Last active February 29, 2024 18:01
Notion.so > Personal Blog | custom domain + disqus comment
const MY_DOMAIN = "agodrich.com"
const START_PAGE = "https://www.notion.so/gatsby-starter-notion-2c5e3d685aa341088d4cd8daca52fcc2"
const DISQUS_SHORTNAME = "agodrich"
addEventListener('fetch', event => {
event.respondWith(fetchAndApply(event.request))
})
const corsHeaders = {
"Access-Control-Allow-Origin": "*",
@0xjac
0xjac / private_fork.md
Last active May 12, 2024 16:53
Create a private fork of a public repository

The repository for the assignment is public and Github does not allow the creation of private forks for public repositories.

The correct way of creating a private frok by duplicating the repo is documented here.

For this assignment the commands are:

  1. Create a bare clone of the repository. (This is temporary and will be removed so just do it wherever.)

git clone --bare git@github.com:usi-systems/easytrace.git

@parmentf
parmentf / GitCommitEmoji.md
Last active May 13, 2024 22:08
Git Commit message Emoji
@ctechols
ctechols / compinit.zsh
Last active April 19, 2024 23:44
Speed up zsh compinit by only checking cache once a day.
# On slow systems, checking the cached .zcompdump file to see if it must be
# regenerated adds a noticable delay to zsh startup. This little hack restricts
# it to once a day. It should be pasted into your own completion file.
#
# The globbing is a little complicated here:
# - '#q' is an explicit glob qualifier that makes globbing work within zsh's [[ ]] construct.
# - 'N' makes the glob pattern evaluate to nothing when it doesn't match (rather than throw a globbing error)
# - '.' matches "regular files"
# - 'mh+24' matches files (or directories or whatever) that are older than 24 hours.
autoload -Uz compinit
@dyatlov
dyatlov / hb-test.py
Last active April 9, 2020 20:03
OpenSSL heartbeat PoC with STARTTLS support - Python3 version
# Quick and dirty demonstration of CVE-2014-0160 by Jared Stafford (jspenguin@jspenguin.org)
# The author disclaims copyright to this source code.
import sys
import struct
import socket
import time
import select
import re
import codecs
@woodja
woodja / hmac.cpp
Created July 25, 2013 19:27
Generate Base64 encoded SHA256 HMAC using C++ and Crypto++ http://www.cryptopp.com for use with AWS API
#include <iostream>
using std::cout;
using std::cerr;
using std::endl;
#include <string>
using std::string;
#include "cryptlib.h"
using CryptoPP::Exception;