Skip to content

Instantly share code, notes, and snippets.

View ducktype's full-sized avatar
👺
Never Satisfied!

ducktype

👺
Never Satisfied!
View GitHub Profile
@steinwaywhw
steinwaywhw / One Liner to Download the Latest Release from Github Repo.md
Last active April 3, 2026 20:16
One Liner to Download the Latest Release from Github Repo
  • Use curl to get the JSON response for the latest release
  • Use grep to find the line containing file URL
  • Use cut and tr to extract the URL
  • Use wget to download it
curl -s https://api.github.com/repos/jgm/pandoc/releases/latest \
| grep "browser_download_url.*deb" \
| cut -d : -f 2,3 \
| tr -d \" \
@CMCDragonkai
CMCDragonkai / regular_expression_engine_comparison.md
Last active March 31, 2026 09:59
Regular Expression Engine Comparison Chart

Regular Expression Engine Comparison Chart

Many different applications claim to support regular expressions. But what does that even mean?

Well there are lots of different regular expression engines, and they all have different feature sets and different time-space efficiencies.

The information here is just copied from: http://regular-expressions.mobi/refflavors.html

REG ADD "HKCU\Control Panel\Desktop" /v DpiScalingVer /t REG_DWORD /d 0x00001018 /f
REG ADD "HKCU\Control Panel\Desktop" /v Win8DpiScaling /t REG_DWORD /d 0x00000001 /f
REG ADD "HKCU\Control Panel\Desktop" /v Logpixels /t REG_DWORD /d 0x00000078 /f
@hasherezade
hasherezade / syscall_extractor.cpp
Last active February 10, 2026 17:04
Extracts syscalls list from NTDLL.DLL
#include <stdio.h>
#include <Windows.h>
// based on: https://www.evilsocket.net/2014/02/11/on-windows-syscall-mechanism-and-syscall-numbers-extraction-methods/
// author: @evilsocket
// modified by: @hasherezade
#define IS_ADDRESS_BETWEEN( left, right, address ) ( (address) >= (left) && (address) < (right) )
PIMAGE_SECTION_HEADER SectionByRVA( PIMAGE_SECTION_HEADER pSections, DWORD dwSections, DWORD rva )
{
@alpegon
alpegon / disable_service.sh
Created February 15, 2017 16:18
Disable auto update and upgrade Ubuntu 16.04
# From https://www.hiroom2.com/2016/05/18/ubuntu-16-04-auto-apt-update-and-apt-upgrade/
# Fix dpkg error in ubuntu 16
sudo systemctl disable apt-daily.service # disable run when system boot
sudo systemctl disable apt-daily.timer # disable timer run
@artyom
artyom / ssh-mux.go
Created February 25, 2017 17:26
Example ssh server with both interactive terminal & sftp support
package main
import (
"bufio"
"bytes"
"flag"
"fmt"
"io"
"io/ioutil"
"log"
@tehrengruber
tehrengruber / void_cb.cpp
Created March 22, 2017 20:09
Optional callback in C++
/**
* Functor behaving like an unset function pointer (nullptr) with
* arbitrary number of arguments.
*
* Usage:
* ```
* #include "Utils/void_cb.hpp"
*
* template <typename CB=void_cb>
* void f(CB callback=nullptr) {
@hakre
hakre / other.php
Created June 18, 2017 23:50
inject php declare ticks poc
<?php
/**
* just some file
*/
$a = 1;
if ($a > 0) {
$a += 2;
print($a);
//npm init -y
//npm install --save puppeteer
//usage: node script.js /path/to/input.html /path/to/output.pdf
//script.js
const puppeteer = require('puppeteer');
(async () => {
@xeoncross
xeoncross / http.php
Created October 24, 2017 01:49
POST requests using curl, sockets, and php-curl
<?php
// command line
// curl --data "text=foobar" http://localhost:3001/api/decrypt
// File sockets
function http_request($url, $data, $a = null, $b = null) {
$opts = array('http' =>
array(
'method' => 'POST',