Skip to content

Instantly share code, notes, and snippets.

View desyncr's full-sized avatar

DC* desyncr

View GitHub Profile
@desyncr
desyncr / emacs-installation.org
Last active September 10, 2022 15:13 — forked from digizeph/emacs-installation.org
Emacs 28 and Doom Emacs Setup Guide

Emacs 28 and Doom Emacs Setup Guide

Goal

Build Emacs 28 from source code and install Doom Emacs

Install Emacs

Checkout sourcecode

BFISD-EE28V-YQJ15-EZZKI-3QDDV
P6I53-QXFCT-1QHE8-MLN1D-FG8XD
IVHD3-3IMTD-C2CK9-WRSIF-45M8Q
GBQR1-WCS7T-5YLHT-BH9WG-1RJFP
26MWC-7ESEF-1G6NR-7MRR7-QLMUK
Q2R7J-NGE2D-M2P36-LK46T-TQVYC
Q8MJB-TAG6X-YYJYT-EQWG7-9BF2R
// execute & set object
$vals = $t->getFlattenedParams();
foreach(explode('?', $t->getSqlQuery()) as $i => $part) {
$sql = (isset($sql) ? $sql : null) . $part;
if (isset($vals[$i])) $sql .= $vals[$i];
}
echo $sql;
strace -e pattern command #match pattern, don't pipe to grep because strace prints to stderr
strace -e open man cat 2> strace.txt #filter open calls and save to strace.txt (via stderr)
strace -p pid #attach to running process
strace -f #also strace child processes
strace -c #show histogram table of num calls
strace -f -e trace=network curl google.com #networrk calls (parent and child processes)
strace -f -e trace=network -s 100 curl google.com #limit string args to 100 chars
@desyncr
desyncr / tmux-cheatsheet.markdown
Created August 28, 2018 15:47 — forked from MohamedAlaa/tmux-cheatsheet.markdown
tmux shortcuts & cheatsheet

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname
# Hello, and welcome to makefile basics.
#
# You will learn why `make` is so great, and why, despite its "weird" syntax,
# it is actually a highly expressive, efficient, and powerful way to build
# programs.
#
# Once you're done here, go to
# http://www.gnu.org/software/make/manual/make.html
# to learn SOOOO much more.
@desyncr
desyncr / ThrottleRequests.php
Created May 31, 2017 17:55 — forked from developerdino/ThrottleRequests.php
Lumen Middleware for rate limiting - based on Laravel's implementation.
<?php
namespace App\Http\Middleware;
use Closure;
use Illuminate\Http\Response;
use Illuminate\Cache\RateLimiter;
class ThrottleRequests
{
GEOMETRY_PROMPT_SUFFIX=$'\n └─▪ '
GEOMETRY_PROMPT='┌─ [$(whoami)]'
diff --git a/.travis.yml b/.travis.yml
index 2947009..3f00fa0 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -1,8 +1,17 @@
language: c
-os:
- - linux
- - osx
@desyncr
desyncr / travis.yml
Last active February 7, 2017 13:14
Simplest way to ad osx?
language: c
os:
- linux
- osx
compiler:
- clang
- gcc