Skip to content

Instantly share code, notes, and snippets.

View ptman's full-sized avatar
💭
.

Paul Tötterman ptman

💭
.
View GitHub Profile
const TelegramBot = require('node-telegram-bot-api');
const { execSync } = require('child_process');
// replace the value below with the Telegram token you receive from @BotFather
const token = '123456789:ABCDEFGHIJKLMNOP';
const dlpath = 'https://api.telegram.org/file/bot'+token+'/'
// /home/root/bin/adddoc is an adaptation of addWithMetadataIfNew with exit 0 on new add
// from https://gist.github.com/Utopiah/e2d5c944bbd632e3ae0530e602977f45
// epubTemplate is based on https://gist.github.com/Utopiah/6728a2477de1c09be4150e43c439e0dd
@KoryNunn
KoryNunn / handshake-airdrop.md
Last active March 12, 2024 07:03
Handshake airdrop for github users.

Had 15 github followers in 2019? You can get about $4kAUD of crypto for minimal effort.

Explain this scam

That's legitimately a good default position to hold, however, in this case, the free money is a function of time, and not only charity.

In February 2020, in order to promote Handshake (HNS) to developers, an airdrop was offered to any Github user with more than 15 followers. The Airdrop would give you 4246HNS, at the time worth around at $0.08USD per coin, for a total of $339.68USD, pretty generous!

Today, 4246HNS is worth around $4000 dollarydoos, and there are plenty of github users who haven't claimed theirs.

@bluewalk
bluewalk / GetNordVPNWireGuardDetails.md
Last active May 6, 2024 01:14
Getting NordVPN WireGuard details

About

Instructions to obtain WireGuard details of your NordVPN account. These can be used to setup a WireGuard tunnel on your router to NordVPN.

Source: https://forum.gl-inet.com/t/configure-wireguard-client-to-connect-to-nordvpn-servers/10422/27

Prerequisites

If you have any linux machine, use that or install a vm if you don't have one.

Get their official linux app installed. Make sure you have wireguard installed too. And set the used technology to Nordlynx by running nordvpn set technology nordlynx

Falsehoods even programmers believe about filesystems
-----------------------------------------------------
I haven't collected evidence someone baked all of these misconceptions into a single program, but boy howdy
are some of them widespread.
1. Deleting and recreating a file is exactly the same as using `ftruncate` on it.
* Not on FAT, NTFS, or anything suitable as a Linux rootfs.
+ Mozilla Thunderbird at least used to assume this about its profile directory.
@enricofoltran
enricofoltran / main.go
Last active April 1, 2024 00:17
A simple golang web server with basic logging, tracing, health check, graceful shutdown and zero dependencies
package main
import (
"context"
"flag"
"fmt"
"log"
"net/http"
"os"
"os/signal"

FWIW: I (@rondy) am not the creator of the content shared here, which is an excerpt from Edmond Lau's book. I simply copied and pasted it from another location and saved it as a personal note, before it gained popularity on news.ycombinator.com. Unfortunately, I cannot recall the exact origin of the original source, nor was I able to find the author's name, so I am can't provide the appropriate credits.


Effective Engineer - Notes

What's an Effective Engineer?

@chrpinedo
chrpinedo / insert-signature-in-pdf.md
Created April 4, 2016 10:27
How to insert your signature in a PDF file by using PDFtk

How to insert your signature in a PDF file by using PDFtk

Your signature in all the sheets

  1. convert the signature image to PDF file
convert firma.png firma.pdf
@tylerapplebaum
tylerapplebaum / Get-Traceroute.ps1
Last active April 21, 2024 09:08
MTR for Powershell
<#
.SYNOPSIS
An MTR clone for PowerShell.
Written by Tyler Applebaum.
Version 2.1
.LINK
https://gist.github.com/tylerapplebaum/dc527a3bd875f11871e2
http://www.team-cymru.org/IP-ASN-mapping.html#dns
@kachayev
kachayev / concurrency-in-go.md
Last active March 11, 2024 11:27
Channels Are Not Enough or Why Pipelining Is Not That Easy
@UniIsland
UniIsland / README.md
Last active September 22, 2021 09:28
Mnemonic Wordlist

This word list is recommended by MNX.io in the article A Proper Server Naming Scheme.

Usage

Choose a word at will from the word list below.

The easiest way to randomly get a word from the wordlist on Linux is:

shuf -n 1 $FILENAME