Skip to content

Instantly share code, notes, and snippets.

View NewProggie's full-sized avatar
👨‍💻
Working...

Kai Wolf NewProggie

👨‍💻
Working...
View GitHub Profile
@pudquick
pudquick / brew.md
Last active June 24, 2024 19:41
Lightly "sandboxed" homebrew on macOS

brew is a bad neighbor

This isn't a guide about locking down homebrew so that it can't touch the rest of your system security-wise.

This guide doesn't fix the inherent security issues of a package management system that will literally yell at you if you try to do something about "huh, maybe it's not great my executables are writeable by my account without requiring authorization first".

But it absolutely is a guide about shoving it into its own little corner so that you can take it or leave it as you see fit, instead of just letting the project do what it likes like completely taking over permissions and ownership of a directory that might be in use by other software on your Mac and stomping all over their contents.

By following this guide you will:

  • Never have to run sudo to forcefully change permissions of some directory to be owned by your account
@moyix
moyix / killbutmakeitlooklikeanaccident.sh
Created February 5, 2022 22:51
Script to inject an exit(0) syscall into a running process. NB: only x86_64 for now!
#!/bin/bash
gdb -p "$1" -batch -ex 'set {short}$rip = 0x050f' -ex 'set $rax=231' -ex 'set $rdi=0' -ex 'cont'
@huytd
huytd / wordle.md
Last active May 16, 2024 20:39
Wordle in less than 50 lines of Bash

image

How to use:

./wordle.sh

Or try the unlimit mode:

@volfegan
volfegan / SolarFlare.pde
Last active June 26, 2020 22:58
Mimics a probe leaving the orbit of a Star
//inspired by https://www.dwitter.net/d/10739
//https://twitter.com/VolfeganGeist/status/1276374673396322304
float i, c, s, t=255, x, y, R, T;
void setup() {
size(1080, 720);
stroke(t, t, 0);
}
void draw() {
clear();
translate(560, 360);
@CumpsD
CumpsD / dontfeedthebeast.md
Created February 11, 2020 15:55 — forked from anonymous/dontfeedthebeast.md
Don’t Feed the Beast – the Great Recruitment Agency Infestation

Don’t Feed the Beast – the Great Recruitment Agency Infestation

“Don’t move to that London” warned my northern grandfather once. “It’s full of spivs”.

The Oxford Dictionary (somewhat chauvinistically) defines a spiv as:

A man, typically a flashy dresser, who makes a living by disreputable dealings

“But I work in IT” I told him. “engineers aren’t like that”.

@fay59
fay59 / Quirks of C.md
Last active January 23, 2024 04:24
Quirks of C

Here's a list of mildly interesting things about the C language that I learned mostly by consuming Clang's ASTs. Although surprises are getting sparser, I might continue to update this document over time.

There are many more mildly interesting features of C++, but the language is literally known for being weird, whereas C is usually considered smaller and simpler, so this is (almost) only about C.

1. Combined type and variable/field declaration, inside a struct scope [https://godbolt.org/g/Rh94Go]

struct foo {
   struct bar {
 int x;
@ivanchromjak
ivanchromjak / package.json
Last active August 8, 2021 03:59
Jekyll npm build script, copies sass, js dependencies to assets directory and concatenates and minifies js files.
{
"name": "jekyll-theme-plus",
"version": "1.0.0",
"description": "Advanced Jekyll theme",
"repository": {
"type": "git",
"url": "https://github.com/ivanchromjak/jekyll-theme-plus.git"
},
"author": "Ivan Chromjak",
"license": "MIT",
@giraldeau
giraldeau / CMakeLists.txt
Created November 3, 2017 21:48
The missing example to use cmake qt5_create_translation
cmake_minimum_required(VERSION 3.8)
project(tsProject)
# Managing translations require LinguistTools module
# The cmake function is defined in the Qt installation tree:
# i.e. Qt5.9.1/5.9.1/gcc_64/lib/cmake/Qt5LinguistTools/Qt5LinguistToolsMacros.cmake
# Reference: https://doc.qt.io/qt-5/cmake-manual.html#qt5linguisttools-macros
find_package(Qt5 COMPONENTS Widgets LinguistTools)
set (CMAKE_CXX_STANDARD 11)
set(CMAKE_INCLUDE_CURRENT_DIR ON)
@ivanperez-keera
ivanperez-keera / Makefile
Last active February 7, 2024 10:30
Clean LaTeX Makefile
.PHONY: default
# Use texfot if available. Produces less output.
TEXFOT_ARGS=--no-interactive --ignore 'Underfull.*' --ignore 'Package polytable Warning: Redefining column' --ignore 'Package hyperref Warning: Token not allowed in a PDF string' --ignore 'LaTeX Warning: .h. float specifier changed to .ht..'
TEXFOT=$(shell which texfot >/dev/null && echo texfot "${TEXFOT_ARGS}" || echo "")
# TEXFOT=
# Use chronic if available. Removes output on zero exitcode.
CHRONIC=$(shell which chronic || echo "")
SHELL := /bin/bash
YARN := yarn
VENDOR_DIR = assets/vendor/
JEKYLL := jekyll
PROJECT_DEPS := package.json
.PHONY: all clean install update
all : serve