Skip to content

Instantly share code, notes, and snippets.

View sffc's full-sized avatar

Shane F. Carr sffc

View GitHub Profile
const CH_BRACE_L = 0x7b as const;
const CH_BRACE_R = 0x7d as const;
const CH_SQUARE_L = 0x5b as const;
const CH_SQUARE_R = 0x5d as const;
const CH_QUOTE_D = 0x22 as const;
const CH_ESCAPE = 0x5c as const;
const CH_COMMA = 0x2c as const;
const CH_COLON = 0x3a as const;
const CH_DOT = 0x2e as const;
const CH_MINUS = 0x2d as const;
@ihor-lev
ihor-lev / sublime_fix_home_end_keys.md
Last active April 16, 2024 14:54
Fix Sublime Text Home and End key usage on Mac OSX

Sublime Text Home/End keys default functionality jumps to the beginning and end of the file.

Fix Home and End keys to move the cursor to the beginning and end of lines.

Preferences > Key Bindings - User

Adding the following to the array:

{ "keys": ["home"], "command": "move_to", "args": {"to": "bol"} },
{ "keys": ["end"], "command": "move_to", "args": {"to": "eol"} },
@jfear
jfear / README MongoDB Podman
Last active December 28, 2023 18:31
Setting up mongod using podman
Copyright (c) 2021 Justin M. Fear
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
@zypA13510
zypA13510 / recaptcha.conf
Last active April 15, 2024 08:07
How to set up a reverse proxy for Recaptcha on Apache httpd
LoadModule ssl_module modules/mod_ssl.so
LoadModule proxy_module modules/mod_proxy.so
LoadModule filter_module modules/mod_filter.so
LoadModule substitute_module modules/mod_substitute.so
<VirtualHost *:443>
ServerName yourdomain.com:443
SSLEngine On
SSLProxyEngine On
@max-lt
max-lt / md-renderer.conf
Last active April 16, 2024 08:37
Nginx config to render markdown files (client side)
location /__special {
internal;
allow all;
root /usr/share/nginx/html/__special;
}
location = /__md_file {
internal;
allow all;
@sffc
sffc / icu_unicodestring_prettyprinter.py
Last active December 22, 2023 09:57
A GDB pretty-printer for ICU4C UnicodeStrings
# To autoload this file into GDB, put the following line in ~/.gdbinit:
#
# python execfile("/path/to/icu_unicodestring_prettyprinter.py")
#
# You can also run that line of code in the GDB console without adding it to ~/.gdbinit.
from __future__ import print_function
from array import array
import re