Skip to content

Instantly share code, notes, and snippets.

@noname007
noname007 / ssl_smtp_example.go
Created October 17, 2023 06:15 — forked from chrisgillis/ssl_smtp_example.go
Golang SSL SMTP Example
package main
import (
"fmt"
"log"
"net"
"net/mail"
"net/smtp"
"crypto/tls"
)
@noname007
noname007 / mail.go
Created October 8, 2023 12:17 — forked from xeoncross/mail.go
Simple SMTP mail sender in golang that can send email directly to anyone. Super basic, but great for sending notice emails. Upgrades to STARTTLS if it can.
package main
import (
"encoding/base64"
"fmt"
"log"
"net"
"net/mail"
"net/smtp"
"strings"
@noname007
noname007 / rsync_backup.py
Created December 7, 2020 06:28 — forked from seebk/rsync_backup.py
Python rsync backup script
#!/usr/bin/python3
#######################################################
# Python rsync Backup script
# Sebastian Kraft, 24.06.2013
#
#######################################################
#-----------------------------------------------------
# Config
@noname007
noname007 / vimium-emacs.md
Created July 27, 2020 08:38 — forked from dmgerman/vimium-emacs.md
Emacs-Style Key Bindings for Vimium

My Vimium Key Bindings (Emacs-Style)

This is a full set of key bindings (as of Vimium v1.45); covering all Vimium functionality. I have tried to map all Vimium functionality to comparable Emacs functionality (whenever possible). In cases where there is no equivalent, those commands are prefixed by <c-g> (indicating <c-g>oogle Chrome; and because <c-g> does not conflict with other Emacs shortcuts at all).

Commented Shortcuts: There are a few Emacs-style shortcuts that are simply not possible in Vimium. All of my shortcuts (including those which were not possible; i.e. where I used a decent alternative) have been commented below. This should help to clarify my rationale.

_Compatibility: All of these shortcuts were tested on Mac OS X (Mavericks). Please note that all of my shortcuts operate under the assumption that your Emacs Meta key is the Alt/Option key. This really was my only choice, because the key is already used in Chrome for shortcuts that c

@noname007
noname007 / Zend_bench.php.log
Created February 14, 2019 13:34 — forked from rybakit/Zend_bench.php.log
php8 jit msgpack.php benchmarks
$ sapi/cli/php Zend/bench.php
------------------------
Total 0.497
$ sapi/cli/php -dextension_dir=`pwd`/modules -dzend_extension=opcache.so Zend/bench.php
------------------------
Total 0.488
$ sapi/cli/php -dextension_dir=`pwd`/modules -dzend_extension=opcache.so -dopcache.enable_cli=1 -dopcache.file_update_protection=0 -dopcache.jit_buffer_size=1M Zend/bench.php
------------------------
@noname007
noname007 / _reader-macros.md
Created March 11, 2018 15:28 — forked from chaitanyagupta/_reader-macros.md
Reader Macros in Common Lisp

Reader Macros in Common Lisp

This post also appears on lisper.in.

Reader macros are perhaps not as famous as ordinary macros. While macros are a great way to create your own DSL, reader macros provide even greater flexibility by allowing you to create entirely new syntax on top of Lisp.

Paul Graham explains them very well in [On Lisp][] (Chapter 17, Read-Macros):

The three big moments in a Lisp expression's life are read-time, compile-time, and runtime. Functions are in control at runtime. Macros give us a chance to perform transformations on programs at compile-time. ...read-macros... do their work at read-time.

@noname007
noname007 / _reader-macros.md
Created March 11, 2018 15:28 — forked from chaitanyagupta/_reader-macros.md
Reader Macros in Common Lisp

Reader Macros in Common Lisp

This post also appears on lisper.in.

Reader macros are perhaps not as famous as ordinary macros. While macros are a great way to create your own DSL, reader macros provide even greater flexibility by allowing you to create entirely new syntax on top of Lisp.

Paul Graham explains them very well in [On Lisp][] (Chapter 17, Read-Macros):

The three big moments in a Lisp expression's life are read-time, compile-time, and runtime. Functions are in control at runtime. Macros give us a chance to perform transformations on programs at compile-time. ...read-macros... do their work at read-time.

@noname007
noname007 / systemtap-on-rust
Created March 3, 2017 09:42 — forked from cuviper/systemtap-on-rust
SystemTap on Rust. This shows stap tracing function calls and returns for a simple hello.rs. Inspired by @bcantrill's DTrace example (https://gist.github.com/bcantrill/b7d031db6e35cfd79201). For annotated probe points, try https://github.com/cuviper/rust-libprobe.
$ uname -a
Linux laptop 3.10.0-123.13.2.el7.x86_64 #1 SMP Fri Dec 12 19:51:03 EST 2014 x86_64 x86_64 x86_64 GNU/Linux
$ rustc -Vv
rustc 1.0.0-alpha (44a287e6e 2015-01-08 17:03:40 -0800)
binary: rustc
commit-hash: 44a287e6eb22ec3c2a687fc156813577464017f7
commit-date: 2015-01-08 17:03:40 -0800
host: x86_64-unknown-linux-gnu
release: 1.0.0-alpha
$ cat hello.rs
0 = Success
1 = Operation not permitted
2 = No such file or directory
3 = No such process
4 = Interrupted system call
5 = Input/output error
6 = No such device or address
7 = Argument list too long
8 = Exec format error
@noname007
noname007 / nginx.conf
Created October 30, 2015 11:52
NGINX-RTMP push to Twitch and Hitbox
#user nobody;
worker_processes 1;
error_log logs/rtmp_error.log debug;
pid logs/nginx.pid;
events {
worker_connections 1024;
}