Skip to content

Instantly share code, notes, and snippets.

@fnky
fnky / ANSI.md
Last active May 5, 2024 19:31
ANSI Escape Codes

ANSI Escape Sequences

Standard escape codes are prefixed with Escape:

  • Ctrl-Key: ^[
  • Octal: \033
  • Unicode: \u001b
  • Hexadecimal: \x1B
  • Decimal: 27
@rise-worlds
rise-worlds / For Mac 4.2.6 unlimited trial.md
Last active May 4, 2024 13:39 — forked from satish-setty/trial.md
Beyond Compare 4 license for Windows, Mac, Linux

for 4.2.4 or higher, 4.2.5,4.2.6,4.3.7, it's works, this is the way which makes Always in evaluation mode.

  1. open Terminal, go to the dir : cd /Applications/Beyond Compare.app/Contents/MacOS
  2. change the name BCompare to BCompare.bak: mv BCompare BCompare.bak
  3. touch a file name BCompare , and chmod a+ux BCompare : touch BCompare && chmod a+ux BCompare
  4. open BCompare with text editor, insert the script :
#!/bin/bash
rm "/Users/$(whoami)/Library/Application Support/Beyond Compare/registry.dat"
"`dirname "$0"`"/BCompare.bak $@
@BrockA
BrockA / waitForKeyElements.js
Created May 7, 2012 04:21
A utility function, for Greasemonkey scripts, that detects and handles AJAXed content.
/*--- waitForKeyElements(): A utility function, for Greasemonkey scripts,
that detects and handles AJAXed content.
Usage example:
waitForKeyElements (
"div.comments"
, commentCallbackFunction
);
@zsoumya
zsoumya / bc4trialreset.cmd
Created July 12, 2019 21:25
Beyond Compare 4 Trial Reset
reg delete "HKCU\Software\Scooter Software\Beyond Compare 4" /v CacheID /f
@whoshuu
whoshuu / curlget.cpp
Created March 31, 2015 06:44
Example libcurl GET request
#include <curl/curl.h>
#include <string>
size_t writeFunction(void *ptr, size_t size, size_t nmemb, std::string* data) {
data->append((char*) ptr, size * nmemb);
return size * nmemb;
}
int main(int argc, char** argv) {
auto curl = curl_easy_init();
@betrcode
betrcode / README.md
Created June 24, 2014 06:36
Using Python to check if remote port is open and accessible.
@wrunk
wrunk / jinja2_file_less.py
Last active September 19, 2023 15:05
python jinja2 examples
#!/usr/bin/env/python
#
# More of a reference of using jinaj2 without actual template files.
# This is great for a simple output transformation to standard out.
#
# Of course you will need to "sudo pip install jinja2" first!
#
# I like to refer to the following to remember how to use jinja2 :)
# http://jinja.pocoo.org/docs/templates/
#
@mebeim
mebeim / so-layout-whack-a-mole.user.js
Last active May 17, 2022 15:49
Fix new "responsive" and unusable design of StackOverflow user profiles
// ==UserScript==
// @name SO Layout Whack-A-Mole
// @description Fix new "responsive" and unusable design of StackOverflow user profiles
// @version 0.8.1
// @author Marco Bonelli
// @namespace https://mebeim.net
// @match https://stackoverflow.com/users/*/*
// @downloadURL https://gist.githubusercontent.com/mebeim/b50951a0f4bbcaac0c1aa73e6a7cdc66/raw/so-layout-whack-a-mole.user.js
// @updateURL https://gist.githubusercontent.com/mebeim/b50951a0f4bbcaac0c1aa73e6a7cdc66/raw/so-layout-whack-a-mole.user.js
// @grant none
@Oaphi
Oaphi / SOmods.tex
Last active November 12, 2021 21:09 — forked from normalhuman/SOmods.tex
[2021 update] SO moderator timeline, from a template by Najib Idrissi. See http://meta.stackoverflow.com/a/311059
\documentclass[tikz]{standalone} % last update March 2016
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\title{Moderator chart}
\begin{document}
\definecolor{rows}{rgb}{0.95,0.95,0.95}
\definecolor{myblue}{rgb}{0.1,0.3,0.9}
\definecolor{mypurple}{rgb}{0.5,0.3,0.7}
\begin{tikzpicture}[scale=0.5]
% 1 horizontal unit = 1 month, 0 = january 2010
@wraithgar
wraithgar / promisify.js
Created May 24, 2020 19:56
Promisify all the functions in any object with a few lines of es6
const handler = {
get: function (target, prop, receiver) {
if (typeof target[prop] !== 'function' ) {
return target[prop]
}
return function () {
return new Promise((resolve, reject) => {
Reflect.get(target, prop, receiver).apply(target, [...arguments, function (err, result) {
if (err) {
return reject(err)