Skip to content

Instantly share code, notes, and snippets.

@gkmuse
gkmuse / KEY.bat
Created August 1, 2012 15:04
Generate Random String of Arbitrary Length with Batch
@echo off
setlocal EnableDelayedExpansion
set char=abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789
set count=0
set salt=0
echo The maximum RC4 key length is 128 bits.
echo Default KEY length is 16 characters.
@paulmach
paulmach / serve.go
Last active December 19, 2024 09:59
Simple Static File Server in Go
/*
Serve is a very simple static file server in go
Usage:
-p="8100": port to serve on
-d=".": the directory of static files to host
Navigating to http://localhost:8100 will display the index.html or directory
listing file.
*/
package main
@EvgenyOrekhov
EvgenyOrekhov / download-current-flickr-image.js
Last active May 17, 2021 19:29
A bookmarklet for downloading currently viewed Flickr image in the biggest available size
/*jslint browser, maxlen: 80 */
/*global DOMParser, fetch */
(function () {
"use strict";
var originalSizeLink = document.querySelector(".Original > a");
var canonicalUrl = document.querySelector("#canonicalurl").href;
var biggestSizeUrl = canonicalUrl + "/sizes/k/";
var secondBiggestSizeUrl = canonicalUrl + "/sizes/h/";
@etes
etes / pi_mount_usb.md
Last active January 2, 2025 11:13
How to setup mount / auto-mount USB Hard Drive on Raspberry Pi

How to setup mount / auto-mount USB Hard Drive on Raspberry Pi

Follow the simple steps in the order mentioned below to have your USB drive mounted on your Raspberry Pi every time you boot it.

These steps are required especially if your are setting up a Samba share, or a 24x7 torrent downloader, or alike where your Raspberry Pi must have your external storage already mounted and ready for access by the services / daemons.

Step 0. Plug in your USB HDD / Drive to Raspberry Pi If you are using a NTFS formatted drive, install the following

#include <Windows.h>
#include "../../API/RainmeterAPI.h"
struct ACCENTPOLICY {
int nAccentState;
int nFlags;
int nColor;
int nAnimationId;
};
struct WINCOMPATTRDATA {
@kkeybbs
kkeybbs / chrome_flags.updated.js
Last active December 14, 2024 20:24
Backup chrome flags to json and restore the backup on another machine.
// 2022-04-03, tested with Chrome 99.0.4844.84 on MacBook Pro m1
/*
Open chrome://flags/
F12 open developer console, swtich to tab "Console"
Paste below codes
- input backup() to download flags backup file
- input restore() to select one backup to restore
*/
function saveFile(filename, data) {
@abdurrahmanekr
abdurrahmanekr / gist:2747d704edec93a06e454eba2653e0df
Last active January 13, 2025 16:35
WhatsApp original chat background image

WhatsApp original chat background image

WhatsApp original darkmoda background image

@Killeroid
Killeroid / gpg-import-and-export-instructions.md
Created October 18, 2017 11:51
How to export and import gpg keys

Every so often I have to restore my gpg keys and I'm never sure how best to do it. So, I've spent some time playing around with the various ways to export/import (backup/restore) keys.

Method 1

Gotten from the RedHat GPG migration manual

Backup the public and secret keyrings and trust database

## Export all public keys

gpg -a --export >mypubkeys.asc

@nzec
nzec / README.MD
Last active December 28, 2024 18:47
DeezLoader Offical Page

Thanks to /u/zpoo32 for reporting several issues in this list!

Deemix

  • deemix: just the cli and the library
  • deemix-pyweb: the app with a GUI
  • deemix-server: just the server part of deemix-pyweb
@deyixtan
deyixtan / sublime_text_patch.md
Last active July 26, 2024 10:35
Sublime Text Patching Guide

Automated Patching

Download slt.py python script (supports multiple build) from this repository.

Usage

python slt.py <"sublime_text file path">


Manual Patching