#define BEGIN_FUNC(X) printf("Function %s Entered\n",X)
#define END_FUNC(X) printf("Function %s End\n",X)
foo()
{
BEGIN_FUNC(__func__);
//Your code here
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import requests | |
| import os, io | |
| from PIL import Image | |
| import sys | |
| output_dir = "output" | |
| if not os.path.exists(output_dir): | |
| os.makedirs(output_dir) | |
| index = 0 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| from copy import deepcopy | |
| from queue import Queue as qq | |
| def mergem(inmap): | |
| lasers(inmap) | |
| res = '' | |
| for row in inmap: | |
| res += ''.join(row) + '\n' | |
| return res |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| set -e | |
| if [ -z "$1" ]; then echo "Example usage: bash pinggraph.sh google.com"; exit; fi | |
| touch pings.txt | |
| while true; do | |
| clear; | |
| cat pings.txt |tail -n 25 |awk -F '/' '{print $5, $6}' |\ | |
| feedgnuplot --lines --points --legend 0 "avg" --legend 1 "max" --title "PING avg/max" \ | |
| --terminal 'dumb 200,50' --exit; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <img id="imgdisplay" style="margin: auto; display: block" src="file:///C:/data/memes/greentext-work00.png"> | |
| <div id="base-div" style="position: fixed; top: 0; left: 0; height: 100vh; width: 100vw; display: flex"> | |
| <button id="left" style="height: 100%; width:50%; background-color: transparent; border: 0"/> | |
| <button id="right" style="height: 100%; width:50%; background-color: transparent; border: 0"/> | |
| </div> | |
| <script> | |
| if (location.hash === "") location = `${location}#0;file:///C:/data/memes/greentext-work00.png`; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # uncomment if you are using python2 | |
| # from __future__ import print_function | |
| import sys | |
| # Use it like this: | |
| # ncat 8.8.8.8 1337 -e "/usr/bin/python3 script.py" | |
| def eprint(*args, **kwargs): | |
| print(*args, file=sys.stderr, **kwargs) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| alias ll="ls -lah" | |
| alias xc="xclip -selection c" | |
| alias t="gnome-terminal `pwd`" | |
| # fuzzy cd | |
| . /home/ed/me/git/z-zsh/z.sh |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| set autoindent | |
| set number | |
| set hlsearch | |
| " start maximized | |
| " Use ~x on an English Windows version or ~n for French. | |
| au GUIEnter * simalt ~x | |
| "set termguicolors | |
| if has('gui_running') | |
| set guioptions-=T " no toolbar |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| CapsLock::Esc | |
| RAlt:: | |
| Return | |
| <^>!x:: | |
| >!x:: | |
| Send, {Del} | |
| Return |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| # socat is much better if you want to tunnel | |
| # socat -v openssl-listen:4444,cert=b.crt,key=b.key,verify=0,reuseaddr,fork tcp4:localhost:5555 | |
| # socat -v tcp4-listen:6666,reuseaddr,fork ssl:localhost:4444,cafile=b.crt | |
| #DEBUG_LVL="-vvvvvvvvvvvvvvvvvvvvvv" | |
| BP_NAME="backpipe" | |
| usage(){ |