Skip to content

Instantly share code, notes, and snippets.

View agarie's full-sized avatar

Carlos Agarie agarie

View GitHub Profile
@ainsleyrutterford
ainsleyrutterford / pokemon-weaknesses.json
Created August 25, 2022 23:16
Pokémon type weaknesses chart as JSON
{
"normal": {
"normal": 1,
"fire": 1,
"water": 1,
"electric": 1,
"grass": 1,
"ice": 1,
"fighting": 2,
"poison": 1,
@Profpatsch
Profpatsch / hlint-to-github-warnings.jq
Last active March 21, 2023 13:56
Convert hlint warnings to github Action “smart” log messages
# the github message format requires newlines to be escaped with the URL-style %0A
# see https://github.com/actions/toolkit/issues/193#issuecomment-605394935
def escapeNewline: gsub("[\\n]"; "%0A");
# depending on the hlint message, we want to display the
# headings and the bodies differently
def prepareTitle:
if .hint == "Unused LANGUAGE pragma"
then { heading: "Unused LANGUAGE pragma: \(.from)"
, suggestion: ""
@dhh
dhh / Gemfile
Created June 24, 2020 22:23
HEY's Gemfile
ruby '2.7.1'
gem 'rails', github: 'rails/rails'
gem 'tzinfo-data', '>= 1.2016.7' # Don't rely on OSX/Linux timezone data
# Action Text
gem 'actiontext', github: 'basecamp/actiontext', ref: 'okra'
gem 'okra', github: 'basecamp/okra'
# Drivers
@teuffy
teuffy / nixos-mbp-dual-boot-instructions.txt
Created January 30, 2018 22:37 — forked from dmjio/nixos-mbp-dual-boot-instructions.txt
How to install nixos on a macbook pro dual boot (mid-2012 model)
Step 0: Download unetbootin and the latest nixos iso, put nixos iso onto unetbootin
Step 1: On OSX, Resize your OSX partition using disk utility (leave 25% - 75% as free space)
Step 2: Boot into NixOS from USB (hold down Alt-Option)
Step 3: Use fdisk to create 3 new partitions (nixosswap ~10GB, nixoshome ~75GB, nixosroot ~20GB)
Step 4: Init file systems / swaps
# mkfs.ext4 -L nixosroot /dev/sda4
# mkswap -L nixosswap /dev/sda5
# mkfs.ext4 -L nixoshome /dev/sda6
Step 5: Mount
# mount /dev/sda4 /mnt
@mqu
mqu / arduino-serial.ino
Created March 31, 2015 05:21
simple ruby example to read and write bytes to Arduino serial port.
uint8_t c;
void setup()
{
// Open serial communications and wait for port to open:
Serial.begin(4800); // 8E2 : 8bits, 2 stops bits, even parity.
// Serial.begin(4800, SERIAL_8E2); // 8E2 : 8bits, 2 stops bits, even parity.
while (!Serial) {
@titipata
titipata / caffe_install.md
Last active January 27, 2022 03:27
My notes on how to install caffe on Ubuntu

Caffe Installation

Note on how to install caffe on Ubuntu. Sucessfully install using CPU, more information for GPU see this link

###Installation

  • verify all the preinstallation according to CUDA guide e.g.
lspci | grep -i nvidia
@waylonflinn
waylonflinn / install-python-data-science.sh
Last active December 4, 2016 05:27
Install Data Science and NLP libraries for python3 in a virtualenv (Numpy, Scipy, Matplotlib, Pandas, Gensim, OpenBLAS and PyTables)
#!/usr/bin/env bash
## create an ubuntu 14.04 hvm instance, then from your home directory:
# 1. download this script
# wget https://gist.githubusercontent.com/waylonflinn/506f563573600d944923/raw/install-python-data-science.sh
# 2. make it executable
# chmod a+x install-python-data-science.sh
(Chapters marked with * are already written. This gets reorganized constantly
and 10 or so written chapters that I'm on the fence about aren't listed.)
Programmer Epistemology
* Dispersed Cost vs. Reduced Cost
* Verificationist Fallacy
* Mistake Metastasis
The Overton Window
Epicycles All The Way Down
The Hyperspace Gates Were Just There
@n8henrie
n8henrie / txt_to_reminders.applescript
Last active March 11, 2024 17:04
Demonstration of using AppleScript with Reminders.app
--taken from http://benguild.com/2012/04/11/how-to-import-tasks-to-do-items-into-ios-reminders/#comment-1346894559
--set theFileContents to (read file "Users:n8henrie:Desktop:Reminders.txt") -- Change this to the path to your downloaded text file with your tasks in it! (Note the : instead of a / between folders) Or, just name them Reminders.txt and put them in your downloads folder
--set theLines to paragraphs of theFileContents
set theLines to {"task name 1", "task name 2"}
repeat with eachLine in theLines
tell application "Reminders"
set mylist to list "Your List Name"
tell mylist
make new reminder at end with properties {name:eachLine, due date:date "7/10/2014 3:00 PM"}