Skip to content

Instantly share code, notes, and snippets.

View TheElectronWill's full-sized avatar
🙃
enjoying

Guillaume Raffin TheElectronWill

🙃
enjoying
View GitHub Profile
@duboisf
duboisf / zscaler_ufw.txt
Last active December 11, 2025 16:59
ufw rules to get zscaler working on linux
sudo ufw allow in on zcctun0 proto any from 10.0.0.0/8 to 100.64.0.1 port 9000
sudo ufw allow in on zcctun0 proto any from 100.64.0.0/16 to 100.64.0.1 port 9000
sudo ufw allow in on zcctun0 proto any from 100.64.0.0/16 to 100.64.0.1 port 9010
sudo ufw allow in on zcctun0 proto udp from 100.64.0.0/16 to 100.64.0.1
@sketchpunk
sketchpunk / Voxel Ray Cast _ Intersection
Last active December 31, 2022 17:53
Voxel Chunk Raycasting using "Fast Voxel Traversal Algorithm" in javascript
// http://www.cse.chalmers.se/edu/year/2010/course/TDA361/grid.pdf
function voxel_raycast_min(ray,chunk,aabb){
//..................................................
// Determine if the voxel chunk has an intersection.
var tBox = {};
if(!Ray.inAABB(aabb,ray,tBox)){ return null; }
//..................................................
var inPos = ray.getPos(tBox.min).nearZero(), // entry point for chunk, Clean up vals near zero.
cellSize = chunk.scale,
@vancluever
vancluever / gnome-tracker-disable.md
Last active September 25, 2025 19:01
GNOME Tracker Disable

Disabling GNOME Tracker and Other Info

GNOME's tracker is a CPU and privacy hog. There's a pretty good case as to why it's neither useful nor necessary here: http://lduros.net/posts/tracker-sucks-thanks-tracker/

After discovering it chowing 2 cores, I decided to go about disabling it.

Directories

struct mpscq_node_t {
mpscq_node_t* volatile next;
void* state;
};
struct mpscq_t {
mpscq_node_t* volatile head;
mpscq_node_t* tail;
};
@umidjons
umidjons / pdo-persistent-connection.php
Created November 26, 2013 09:35
PHP: Persistent connection to DB via PDO / use existing connection if available.
<?php
class MyClass
{
const DB_HOST = '127.0.0.1';
const DB_NAME = 'mydb';
const DB_USER = 'me';
const DB_PSWD = '123abc';
private static $db;
@tonymorris
tonymorris / gist:5367920
Created April 11, 2013 23:03
The z in scalaz
The z in scalaz means this: it was early 2008 and I was working for a Java consultancy and so of course, I used the most appropriate tool for the job: scala. But it had *terrible* libraries, so I offered to fix those while also meeting my other objectives. Turns out that the Scala guys were extremely hostile to even half-decent libraries (and still are to this day). I still struggle to wrap my head around this sometimes.
Anyway, so I thought, well fuck it, I will just keep them to myself for now. My (awesome) employer had already agreed that we'd probably open-source such a thing, but I was concerned most about my primary goal. So then it came time to "name" this library. I had named it "scalax" simply so that I did not have the inclination to think of a proper name. Then I found out that such a library was being developed and with my internal name! Whatever, I thought.
So I looked at this scalax library, hoping that I could just abandon my efforts and jump on board with everyone else -- they too had figure