Skip to content

Instantly share code, notes, and snippets.

@fnky
fnky / ANSI.md
Last active April 27, 2024 06:10
ANSI Escape Codes

ANSI Escape Sequences

Standard escape codes are prefixed with Escape:

  • Ctrl-Key: ^[
  • Octal: \033
  • Unicode: \u001b
  • Hexadecimal: \x1B
  • Decimal: 27
@azizur
azizur / linkedin-withdraw-invites.js
Last active April 27, 2024 06:10
Manage LinkedIn Invitations
var duration = " month"; // withdraw invites older than x month.
var timeago = document.querySelectorAll(".time-badge");
var inviteActionables = document.querySelectorAll(".invitation-card__action-btn");
var nameNodes = document.querySelectorAll(".invitation-card__tvm-title");
var names = [];
function cancel_invite(cancelId, inviteNode) {
setTimeout(function () {
console.info("Withdrawing invite for", cancelId, names[cancelId]);
// Visit https://www.linkedin.com/my-items/saved-jobs/?cardType=ARCHIVED
// window.location.replace('https://www.linkedin.com/my-items/saved-jobs/?cardType=ARCHIVED');
(function clanupSavedJobs() {
setInterval(() => {
const results = document.querySelectorAll('.entity-result__actions-overflow-menu-dropdown');
results.forEach((entry, index) => {
setTimeout(() => {
const button = entry.querySelector('button');
button.click();
@azizur
azizur / Creating a static copy of a dynamic website.md
Last active April 27, 2024 06:08
Creating a static copy of a dynamic website

The command line, in short…

wget -k -K -E -r -l 10 -p -N -F --restrict-file-names=windows -nH http://website.com/

…and the options explained

  • -k : convert links to relative
  • -K : keep an original versions of files without the conversions made by wget
  • -E : rename html files to .html (if they don’t already have an htm(l) extension)
  • -r : recursive… of course we want to make a recursive copy
  • -l 10 : the maximum level of recursion. if you have a really big website you may need to put a higher number, but 10 levels should be enough.
@superseb
superseb / k3s-etcd-commands.md
Last active April 27, 2024 06:08
k3s etcd commands

k3s etcd commands

etcd

Setup etcdctl using the instructions at https://github.com/etcd-io/etcd/releases/tag/v3.4.13 (changed path to /usr/local/bin):

Note: if you want to match th etcdctl binaries with the embedded k3s etcd version, please run the curl command for getting the version first and adjust ETCD_VER below accordingly:

curl -L --cacert /var/lib/rancher/k3s/server/tls/etcd/server-ca.crt --cert /var/lib/rancher/k3s/server/tls/etcd/server-client.crt --key /var/lib/rancher/k3s/server/tls/etcd/server-client.key https://127.0.0.1:2379/version
https://doc.downloadha.com/h/Documentaries/April2018/One.Strange.Rock.S01E02.WEBRip.x264-ION10_www.Downloadha.com_.mp4
https://doc.downloadha.com/h/Documentaries/April2018/One.Strange.Rock.S01E03.WEBRip.x264-ION10_www.Downloadha.com_.mp4
https://doc.downloadha.com/h/Documentaries/April2018/One.Strange.Rock.S01E04.WEBRip.x264-ION10_www.Downloadha.com_.mp4
https://doc.downloadha.com/h/Documentaries/April2018/One.Strange.Rock.S01E05.WEBRip.x264-ION10_www.Downloadha.com_.mp4
https://doc.downloadha.com/h/Documentaries/April2020/Amazing.Dogs.Series.1/Amazing.Dogs.Series.1.1of3.Mans.Best.Friend.1080p.HDTV.x264.AAC.MVGroup_www.Downloadha.com_.mp4
https://doc.downloadha.com/h/Documentaries/April2020/Amazing.Dogs.Series.1/Amazing.Dogs.Series.1.2of3.America.1080p.HDTV.x264.AAC.MVGroup_www.Downloadha.com_.mp4
https://doc.downloadha.com/h/Documentaries/April2020/Amazing.Dogs.Series.1/Amazing.Dogs.Series.1.3of3.Africa.1080p.HDTV.x264.AAC.MVGroup_www.Downloadha.com_.mp4
https://doc.downloadha.com/h/Documentaries/April2020/C
@aamiaa
aamiaa / CompleteDiscordQuest.md
Last active April 27, 2024 06:03
Complete Recent Discord Quest

Complete Recent Discord Quest

Note

This no longer works in browser!

Note

This no longer works if you're alone in vc! Somebody else has to join you!

How to use this script:

  1. Accept the quest under User Settings -> Gift Inventory
@gkhays
gkhays / DrawSineWave.html
Last active April 27, 2024 06:01
Oscillating sine wave, including the steps to figuring out how to plot a sine wave
<!DOCTYPE html>
<html>
<head>
<title>Sine Wave</title>
<script type="text/javascript">
function showAxes(ctx,axes) {
var width = ctx.canvas.width;
var height = ctx.canvas.height;
var xMin = 0;
@noeleo25
noeleo25 / Home.vue
Last active April 27, 2024 06:01
Custom directive: sticky header after scroll
<template>
<!-- using custom directive v-sticky -->
<div class="w-100" v-sticky:top="{minWidth: 768, offset: 'vh'}">
</template>
@noeleo25
noeleo25 / CustomButton.vue
Last active April 27, 2024 06:01
Vue component for Custom Button
<template>
<button
:type="btnType"
class="primary-btn">
<slot> </slot>
</button>
</template>
<script>
export default {