Skip to content

Instantly share code, notes, and snippets.

View coderobe's full-sized avatar
🎩
i know a thing or two about a thing or two

Mara Robin B. coderobe

🎩
i know a thing or two about a thing or two
View GitHub Profile
@spenserhale
spenserhale / git-batch-push.sh
Last active March 5, 2024 19:21
When your repo exceeds upload limit (GitHub 2GB), you can push in batches so you can store up to total size limit. (100GB) (Warning uses force push, ideally should be used for setting up new remote, once)
# Adjust the following variables as necessary
REMOTE=origin
BRANCH=$(git rev-parse --abbrev-ref HEAD)
BATCH_SIZE=250
# check if the branch exists on the remote
if git show-ref --quiet --verify refs/remotes/$REMOTE/$BRANCH; then
# if so, only push the commits that are not on the remote already
range=$REMOTE/$BRANCH..HEAD
else
#!/usr/bin/awk -f
# This program is a copy of guff, a plot device. https://github.com/silentbicycle/guff
# My copy here is written in awk instead of C, has no compelling benefit.
# Public domain. @thingskatedid
# Run as awk -v x=xyz ... or env variables for stuff?
# Assumptions: the data is evenly spaced along the x-axis
# TODO: moving average
@jakevdp
jakevdp / PythonCpp.ipynb
Last active January 8, 2020 03:44
Hack to make Python look like C++
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@Earnestly
Earnestly / makepkg_overview.rst
Last active March 22, 2024 03:48
A brief overview of the process involved in creating a pacman package.

A Brief Tour of the Makepkg Process: What Makes a Pacman Package

Introduction

This is a terse document covering the anatomy of a package built for the pacman package manager.

The following example commands can mostly run verbatim to manually create a

#!/usr/bin/env ruby
require "twitter"
# Twitter client configuration
client = Twitter::REST::Client.new do |config|
config.consumer_key = YOUR_KEYS_HERE
config.consumer_secret = YOUR_KEYS_HERE
config.access_token = YOUR_KEYS_HERE
config.access_token_secret = YOUR_KEYS_HERE
end
@taviso
taviso / rebinder.c
Created November 12, 2013 16:34
Simple rebinding nameserver.
#include <stdlib.h>
#include <stdbool.h>
#include <stdint.h>
#include <stdio.h>
#include <stddef.h>
#include <stdlib.h>
#include <unistd.h>
#include <string.h>
#include <netdb.h>
#include <time.h>