Skip to content

Instantly share code, notes, and snippets.

View someburner's full-sized avatar

Jeff Hufford someburner

View GitHub Profile
# Connectiong by SSH from Android Termux to Desktop and vice-versa.md
# Copyright (c) 2019 Evandro Coan
# 
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
@JoelSpeed
JoelSpeed / configmap.yaml
Created July 6, 2018 10:22
Nginx caching of upstream OAuth2 Proxy authentication requests
---
apiVersion: v1
kind: ConfigMap
metadata:
name: nginx-ingress-controller
namespace: ingress
data:
http-snippet: |
proxy_cache_path /var/run/cache levels=1:2 keys_zone=authentication:10m inactive=3s;
@shafik
shafik / WhatIsStrictAliasingAndWhyDoWeCare.md
Last active April 26, 2025 00:19
What is Strict Aliasing and Why do we Care?

What is the Strict Aliasing Rule and Why do we care?

(OR Type Punning, Undefined Behavior and Alignment, Oh My!)

What is strict aliasing? First we will describe what is aliasing and then we can learn what being strict about it means.

In C and C++ aliasing has to do with what expression types we are allowed to access stored values through. In both C and C++ the standard specifies which expression types are allowed to alias which types. The compiler and optimizer are allowed to assume we follow the aliasing rules strictly, hence the term strict aliasing rule. If we attempt to access a value using a type not allowed it is classified as undefined behavior(UB). Once we have undefined behavior all bets are off, the results of our program are no longer reliable.

Unfortunately with strict aliasing violations, we will often obtain the results we expect, leaving the possibility the a future version of a compiler with a new optimization will break code we th

@stueja
stueja / lxd-wayland-gui.md
Last active April 15, 2025 07:45
GUI application via Wayland from Ubuntu LXD container on Arch Linux host
@noidexe
noidexe / joycon-mappings.txt
Created July 31, 2017 00:25
Nintendo Switch Joycons as html5 bluetooth controller
Nintendo Switch Joycons use standard bluetooth technology and can be paired with a PC or phone by holding the power button between SL and SR while the console is off.
If your Switch can't find em after that just reattach them to the console and they'll pair up immediately.
Button scheme info obtained using http://html5gamepad.com and http://gamepadviewer.com
Joycon R: Wireless Gamepad (Vendor: 057e Product: 2007)
Switch, Generic, XBOX
SL, B4, LB
SR, B5, RB

Problem

In Arch Linux mkinitcpio -p linux

shows

Possibly missing firmware for module: aic94xx
 Possibly missing firmware for module: wd719x
#!/bin/bash
# THIS GIST IS NO LONGER MAINTAINED!
# GO HERE FOR THE NEW REPO - https://github.com/ZakKemble/avr-gcc-build
# http://www.nongnu.org/avr-libc/user-manual/install_tools.html
# For optimum compile time this should generally be set to the number of CPU cores your machine has
@jchandra74
jchandra74 / PowerShell Customization.md
Last active January 8, 2025 09:35
PowerShell, Cmder / ConEmu, Posh-Git, Oh-My-Posh, Powerline Customization

Pimping Up Your PowerShell & Cmder with Posh-Git, Oh-My-Posh, & Powerline Fonts

Backstory (TLDR)

I work as a full-stack developer at work. We are a Windows & Azure shop, so we are using Windows as our development platform, hence this customization.

For my console needs, I am using Cmder which is based on ConEmu with PowerShell as my shell of choice.

Yes, yes, I know nowadays you can use the Linux subsystem on Windows 10 which allow you to run Ubuntu on Windows. If you are looking for customization of the Ubuntu bash shell, check out this article by Scott Hanselman.

@mustafaturan
mustafaturan / network-tweak.md
Last active March 27, 2025 17:28
Linux Network Tweak for 2 million web socket connections

Sample config for 2 million web socket connection

    sysctl -w fs.file-max=12000500
    sysctl -w fs.nr_open=20000500
    # Set the maximum number of open file descriptors
    ulimit -n 20000000

    # Set the memory size for TCP with minimum, default and maximum thresholds 
 sysctl -w net.ipv4.tcp_mem='10000000 10000000 10000000'
@tonespy
tonespy / Jenkinsfile
Created March 3, 2017 13:53
Jenkins Pipeline Jenkinsfile
// Every jenkins file should start with either a Declarative or Scripted Pipeline entry point.
node {
//Utilizing a try block so as to make the code cleaner and send slack notification in case of any error
try {
//Call function to send a message to Slack
notifyBuild('STARTED')
// Global variable declaration
def project = 'sa-android'
def appName = 'Sample App'