Skip to content

Instantly share code, notes, and snippets.

View cjsimon's full-sized avatar

Christopher Simon cjsimon

View GitHub Profile
@SpinB
SpinB / hide_buttons.css
Last active June 2, 2019 18:04
Hide Firefox min, max and close buttons.
/*
You can add this block to your userChrome.css or you can
save the file and import it to your userChrome.css
@import "css/userChrome-files/hide_buttons.css";
Just change the path to the file.
*/
/************************************************
Hide min max and close Buttons in Private Mode
************************************************/
@npearce
npearce / install-docker.md
Last active June 5, 2024 20:07
Amazon Linux 2 - install docker & docker-compose using 'sudo amazon-linux-extras' command

UPDATE (March 2020, thanks @ic): I don't know the exact AMI version but yum install docker now works on the latest Amazon Linux 2. The instructions below may still be relevant depending on the vintage AMI you are using.

Amazon changed the install in Linux 2. One no-longer using 'yum' See: https://aws.amazon.com/amazon-linux-2/release-notes/

Docker CE Install

sudo amazon-linux-extras install docker
sudo service docker start
@cnlohr
cnlohr / esp32_aes_example.c
Created November 7, 2018 19:50
Example of using hardware AES 256 Crypto in CBC mode on the ESP32 using ESP-IDF
#include <string.h>
#include <stdio.h>
#include <hwcrypto/aes.h>
/*
For Encryption time: 1802.40us (9.09 MB/s) at 16kB blocks.
*/
static inline int32_t _getCycleCount(void) {
int32_t ccount;
@bogobogo
bogobogo / lisp.json
Last active April 21, 2021 20:29
lisp.json
{
"common lisp let": {
"prefix": "llet",
"body": [
"(let ((${1:var}))",
" ${2:body})"
],
"description": "common lisp let"
},
"common lisp if": {
@Ocramius
Ocramius / example.php
Created June 25, 2017 10:40 — forked from hikari-no-yume/example.php
function chaining for PHP 7
<?php declare(strict_types=1);
require_once "✨.🐘";
✨($_)->strlen("foo")->var_dump($_);
@bwann
bwann / README.md
Last active June 22, 2024 20:20
Tunnelling SSH over SSL/TLS

How to tunnel SSH over SSL/TLS

laptop ssh -> laptop stunnel -> evil network -> internet -> your server -> your server ssh

Server (your shell server/home box/work box/whatever)

Sets up a stunnel process listening externally on port 2443/tcp, forwards to localhost 22/tcp

  • Install stunnel, e.g. yum install stunnel
  • Install server config snippet to /etc/stunnel/stunnel.conf
@BrianGilbert
BrianGilbert / init.lua
Created April 5, 2016 05:35
Hammerspoon Config
local alert = require "hs.alert"
local application = require "hs.application"
local fnutils = require "hs.fnutils"
local grid = require "hs.grid"
local hotkey = require "hs.hotkey"
local mjomatic = require "hs.mjomatic"
local window = require "hs.window"
grid.MARGINX = 0
grid.MARGINY = 0
@bkaradzic
bkaradzic / orthodoxc++.md
Last active June 27, 2024 06:39
Orthodox C++

Orthodox C++

What is Orthodox C++?

Orthodox C++ (sometimes referred as C+) is minimal subset of C++ that improves C, but avoids all unnecessary things from so called Modern C++. It's exactly opposite of what Modern C++ suppose to be.

Why not Modern C++?

@hacfi
hacfi / token_constants.php
Created May 9, 2015 06:09
PHP Token Constants List
<?php
$tokenConstants = array_filter(
get_defined_constants(),
function ($value, $key) {
return substr($key, 0, 2) === 'T_';
},
ARRAY_FILTER_USE_BOTH
);
@nurinamu
nurinamu / tag_img.rb
Created September 7, 2014 23:13
jekyll plugin for custom size img tag.
module Jekyll
class RenderImgTag < Liquid::Tag
def initialize(tag_name, text, tokens)
super
@url , *@val= text.split(/ /)
if @val.length > 0
@width , *@height = @val[0].split(/x/)
end