Skip to content

Instantly share code, notes, and snippets.

View dialtone's full-sized avatar

Valentino Volonghi dialtone

View GitHub Profile
@dialtone
dialtone / f1plot.py
Created March 25, 2022 22:19
plotting fun stuff in f1
"""Overlaying speed traces of two laps
======================================
Compare two fastest laps by overlaying their speed traces.
"""
import numpy as np
import matplotlib.pyplot as plt
import fastf1.plotting
import itertools as it
diff -puNr --no-dereference parallels-tools-15.1.2.47123.saved/prl_fs/SharedFolders/Guest/Linux/prl_fs/prlfs_compat.h parallels-tools-15.1.2.47123/prl_fs/SharedFolders/Guest/Linux/prl_fs/prlfs_compat.h
--- parallels-tools-15.1.2.47123.saved/prl_fs/SharedFolders/Guest/Linux/prl_fs/prlfs_compat.h 2019-12-08 17:18:48.986636072 +1100
+++ parallels-tools-15.1.2.47123/prl_fs/SharedFolders/Guest/Linux/prl_fs/prlfs_compat.h 2020-04-10 19:34:33.094299692 +1000
@@ -11,7 +11,11 @@
static struct proc_dir_entry *
prlfs_proc_create(char *name, umode_t mode, struct proc_dir_entry *parent,
+#if LINUX_VERSION_CODE < KERNEL_VERSION(5,6,0)
struct file_operations *fops)
+#else
@dialtone
dialtone / .vimrc
Created August 18, 2017 21:26
.vimrc
"" install pathogen
call pathogen#infect()
set nocompatible " choose no compatibility with legacy vi
syntax enable
set encoding=utf-8
set showcmd " display incomplete commands
"" Whitespace
set nowrap " don't wrap lines
@dialtone
dialtone / ribalancer.py
Last active September 17, 2018 22:06
Balance RI Instances
import boto3
import argparse
from pprint import pprint as pp
from dateutil.tz import tzutc
from datetime import datetime, timedelta
from collections import defaultdict as dd
class IL(object):
"""
[ec2-user@webserver-dotcom-ctf4sNiM1U ~]$ sudo strace -c -p 25117
Process 25117 attached
^CProcess 25117 detached
% time seconds usecs/call calls errors syscall
------ ----------- ----------- --------- --------- ----------------
98.00 1.707074 90 19010 2342 futex

Keybase proof

I hereby claim:

  • I am dialtone on github.
  • I am dialtone (https://keybase.io/dialtone) on keybase.
  • I have a public key whose fingerprint is 747C 877B 2D5C 6F6D 4029 E175 F4B9 73DB CC22 7465

To claim this, I am signing this object:

Stacktrace (most recent call last):
File "raven/middleware.py", line 30, in __call__
iterable = self.application(environ, start_response)
File "routes/middleware.py", line 131, in __call__
response = self.app(environ, start_response)
File "newrelic/api/error_trace.py", line 60, in wrapper
return wrapped(*args, **kwargs)
File "pylons/wsgiapp.py", line 107, in __call__
response = self.dispatch(controller, environ, start_response)
File "pylons/wsgiapp.py", line 312, in dispatch
diff --git a/Library/Formula/nginx.rb b/Library/Formula/nginx.rb
index f3f4bce..b1bbcb5 100644
--- a/Library/Formula/nginx.rb
+++ b/Library/Formula/nginx.rb
@@ -22,6 +22,7 @@ class Nginx < Formula
depends_on 'pcre'
depends_on 'passenger' => :optional
+ depends_on 'geoip'
# SPDY needs openssl >= 1.0.1 for NPN; see:
@dialtone
dialtone / connect.sh
Created October 31, 2013 03:42
Given a few parameters connect to a set of ec2 instances, one per tmux pane
#!/bin/bash
SSH_KEY=
USERNAME=
usage() { echo "Usage: $0 -s <tmux_session_name> [-k <my_ssh_key.pem>] [-u <username>] <host> <host1> ..." 1>&2; exit 1; }
while getopts "s:k:u:" option;
do
case "${option}" in
s) SESSION_NAME=${OPTARG};;
@dialtone
dialtone / .tmux.conf
Created October 31, 2013 02:48
My .tmux.conf setup
# Rebind key to Ctrl-a
unbind C-b
set -g prefix C-z
bind-key C-z send-prefix
# In copy mode behave like vi
setw -g mode-keys vi
setw -g xterm-keys on
# Use mouse to make selections