Skip to content

Instantly share code, notes, and snippets.

@tuxfight3r
tuxfight3r / 01.bash_shortcuts_v2.md
Last active May 11, 2024 06:21
Bash keyboard shortcuts

Bash Shortcuts

visual cheetsheet

Moving

command description
ctrl + a Goto BEGINNING of command line
@edokeh
edokeh / index.js
Last active May 11, 2024 06:19
佛祖保佑,永无 BUG
//
// _oo0oo_
// o8888888o
// 88" . "88
// (| -_- |)
// 0\ = /0
// ___/`---'\___
// .' \\| |// '.
// / \\||| : |||// \
// / _||||| -:- |||||- \
@bdesham
bdesham / process.awk
Last active May 11, 2024 06:19
Takes a list of commands with timing information and displays the elapsed time for each one.
# Takes a list of commands with timing information and displays the elapsed
# time for each one.
#
# The input is expected to look like
#
# +1518804574.3228740692 colors:76> local k
# +1518804574.3228929043 colors:77> k=44
# +1518804574.3229091167 colors:77> color[${color[$k]}]=44
# +1518804574.3229229450 colors:77> k=33
# +1518804574.3229279518 colors:77> color[${color[$k]}]=33
@mcandre
mcandre / homebrew-install-mkpasswd.md
Created May 21, 2019 21:16
Homebrew install mkpasswd
$ brew install --build-from-source https://raw.githubusercontent.com/mcandre/homebrew-core/27757013b40567774c223a93faa720ed813ece71/Formula/whois.rb
@mike0
mike0 / memtool.c
Created June 11, 2012 13:48
memtool
/*
* Copyright 2006 Freescale Semiconductor, Inc. All Rights Reserved.
*/
/*
* The code contained herein is licensed under the GNU General Public
* License. You may obtain a copy of the GNU General Public License
* Version 2 or later at the following locations:
*
* http://www.opensource.org/licenses/gpl-license.html
@disler
disler / README.md
Created March 31, 2024 14:34
Use these Prompt Chains to build HIGH QUALITY AI Agents (Agentic Building Blocks)

Setup

  1. Create a new directory with these three files (requirements.txt, main.py, README.md)
  2. python -m venv venv
  3. source venv/bin/activate
  4. pip install -r requirements.txt
  5. python main.py
  6. Update main() to run the example prompt chains
@baptx
baptx / instagram-api_direct_messages_backup.js
Last active May 11, 2024 06:12
Instagram API: view and backup direct messages from a web browser
/*
Instagram API: view and backup direct messages from a web browser
Since April 2020, Instagram has a web version to send and read direct messages so my Instagram scripts are not longer needed and I would not recommend using them unless you really need it, to avoid being banned
(never happened to me with Instagram but WhatsApp is owned by Facebook also and they did it to users registering from an unofficial app like yowsup: https://github.com/tgalal/yowsup/commit/88b8ad9581fa22dac330ee3a05fec4e485dfa634#diff-b335630551682c19a781afebcf4d07bf978fb1f8ac04c6bf87428ed5106870f5)
1) Log in on Instagram web version and go to your profile page
(the home page will not work because it loads data when scrolling down and the direct messages will be displayed at the bottom of the page)
2) Modify HTTP headers with a browser addon like Header Editor (https://addons.mozilla.org/en-US/firefox/addon/header-editor/)
@marcoblos
marcoblos / login-without-password-and-without-copy-key-to-server.md
Created May 26, 2019 05:42
Step by step: create a pem file to login without password and without copy local keys to remote server. SSH authentication like AWS EC2.
  1. Login with account user (not root)
mkdir pem
cd pem
ssh-keygen -b 2048 -f identity -t rsa
  1. Copy public key contents to authorized_keys
@simply-coded
simply-coded / OnTopNotepad.ps1
Last active May 11, 2024 06:07
An always on top notepad for taking notes and such.
# makes a notepad process that remains on top of other windows.
$cs = Add-Type -MemberDefinition '
[DllImport("user32.dll")] public static extern bool SetWindowPos(IntPtr a, IntPtr b, int c, int d, int e, int f, uint g);
public static void AlwaysOnTop(IntPtr a, int d) { SetWindowPos(a, (IntPtr)(-1), 0, d-250, 300, 200, 64); }
' -Name PS -PassThru;
$hWnd = Start-Process -FilePath notepad -PassThru;
$screen = Get-WmiObject -Class Win32_VideoController | Select-Object CurrentVerticalResolution;
$cs::AlwaysOnTop($hWnd.MainWindowHandle, $screen.CurrentVerticalResolution);
@simply-coded
simply-coded / CreateExcelFile.vbs
Last active May 11, 2024 06:06
Use VBScript to create, open, and edit excel files. ( Excel needs to be installed on your computer ).
'Microsoft Excel Automation Basics
':: Create and edit an Excel File.
'---------------------------------
'create the excel object
Set objExcel = CreateObject("Excel.Application")
'view the excel program and file, set to false to hide the whole process
objExcel.Visible = True