Skip to content

Instantly share code, notes, and snippets.

View skhaz's full-sized avatar
:octocat:
It's 5.50 a.m.... Do you know where your stack pointer is?

Rodrigo Delduca skhaz

:octocat:
It's 5.50 a.m.... Do you know where your stack pointer is?
View GitHub Profile
@devdumpling
devdumpling / backup_and_push.sh
Created August 25, 2024 18:06
Sync zed config
#!/bin/bash
# This is a simple script to copy non tmp files from zed config to a repo you can use for storing your config.
# This is slightly modified from what I actually use, which stores a number of other config files that I share across machines.
# rsync is used instead of cp for flexibility
ZED_SOURCE_DIR="/Users/USER/.config/zed"
ZED_DEST_DIR="/Users/USER/PATH_TO_SYNC_REPO/.config/zed"
# absolute path to repo storing your config
@jsbueno
jsbueno / pyproject.toml
Created January 23, 2024 15:33
Minimal pyproject.toml to use with setuptools and having a working, locally installable, package
[build-system]
requires = ["setuptools", "wheel"]
build-backend = "setuptools.build_meta"
[project]
name = "mypackage"
version = "1.0"
[tool.setuptools]
packages = ["mypackage"]
@steren
steren / enable-fb-hosting-cloud-run.sh
Last active March 26, 2022 19:14
Set up Firebase Hosting in front of a Cloud Run service
#!/bin/bash
# Set up Firebase Hosting in front of a Cloud Run service, without using the firebase CLI
# The following commands must be installed:
# - gcloud
# - curl
# - jq
# Update these variables
PROJECT_ID="enable-fb-hosting" # Make sure you have enabled Firebase on this Google Cloud project

Change Apple OS X Dock size from Apple Terminal

defaults write com.apple.dock tilesize -int 32; killall Dock

32 is icon size

@sj26
sj26 / LICENSE.md
Last active August 27, 2024 18:07
Bash retry function

This is free and unencumbered software released into the public domain.

Anyone is free to copy, modify, publish, use, compile, sell, or distribute this software, either in source code form or as a compiled binary, for any purpose, commercial or non-commercial, and by any means.

In jurisdictions that recognize copyright laws, the author or authors of this software dedicate any and all copyright interest in the software to the public domain. We make this dedication for the benefit

@ryancdotorg
ryancdotorg / dnaas.c
Created October 30, 2013 23:20
Wrapper library to use /dev/null as a service on Linux via LD_PRELOAD
/* This is a wrapper library that will give your server the power of
* /dev/null as a service, as seen at http://devnull-as-a-service.com/
*
* Compile:
* gcc -ggdb -shared -fPIC dnaas.c -ldl -lcurl -o libdnaas.so
*
* Try:
* LD_PRELOAD=./libdnaas.so dd if=/dev/sda of=/dev/null bs=8192 count=16
*
* Install: