Skip to content

Instantly share code, notes, and snippets.

View tonylambiris's full-sized avatar

Tony Lambiris tonylambiris

  • Boston, MA
View GitHub Profile
@tonylambiris
tonylambiris / arch.md
Last active June 19, 2019 19:26 — forked from Razz/arch.md
install arch

Write USB install key (OSX specific)

# diskutil list
# disutil unmount /dev/diskX
// Dont forget the r in rdisk
# sudo dd if=/path/to/arch.iso of=/dev/rdiskX bs=4M status=progress

Connect to wifi after booting USB

@tonylambiris
tonylambiris / PKGBUILD.patch
Last active December 10, 2017 01:02 — forked from starain/PKGBUILD.patch
Chrome remote desktop AUR patch: 63.0.3239.17
--- ../chrome-remote-desktop/PKGBUILD 2017-10-16 04:38:35.000000000 -0700
+++ PKGBUILD 2017-12-09 16:17:05.000000000 -0800
@@ -3,7 +3,7 @@
# Contributor: Mateus Rodrigues Costa <charles [dot] costar [at] gmail [dot] com>
pkgname=chrome-remote-desktop
-pkgver=61.0.3163.20
+pkgver=63.0.3239.17
pkgrel=2
pkgdesc="Allows you to securely access your computer over the Internet through Chrome."
@tonylambiris
tonylambiris / gist:d49109107951c964f42e8d74c0c6ea5c
Created January 2, 2018 05:18 — forked from auscompgeek/gist:1e60032d1c84ecea81c3
hack.lu CTF - packed - brute-force the xor cipher
#!/usr/bin/python3
# hack.lu CTF - packed - brute-force the xor cipher
CIPHERTEXT = "H51\\\'Ux2J&+(3Z;Uxcx0Xxs\x13h\x014$V!R($R>\t/)R!\x01<.\x13,N-aP4M4aRuG1-VuU0 GuH+a@0W=3R9\x01>(_0\x01,8C0Rx GuN6\"V|\x1ezKZ3\x014$]}R!2\x1d4S?7\x1au\x1fxs\t_\x01xa\x13<Gx)R&Ip2J&\x0f93T#zj\x1c\x1ap\x13rk\x00g\x01e|\x13g\x19ju\x0ba\x18jt\x02o+xa\x13u\x01xa\x13%S1/Gu\x03\x1b.\\:N7.\\:N4o\x13\x0cN-3\x133M9&\x13<Rx A2WjiZ{DvaX0Xjh\x136N6\"R!\x01\x07rC0p\x138a\x1dc22ieu\x161Fw+=-@0\x1bRa\x13u\x01(3Z;UxcR\'F.s\x1c>D!s\x13<Rx,Z&R1/Tw+R"
import itertools
import string
def code(key, cipher):
while len(key) < len(cipher):
@tonylambiris
tonylambiris / 60-scheduler.rules
Last active March 7, 2018 23:16 — forked from radupotop/60-scheduler.rules
kernel 4.12 scheduler rules for udev
# /etc/udev/rules.d/60-scheduler.rules
#
# set none scheduler for non-rotating disks
ACTION=="add|change", KERNEL=="sd[a-z]|mmcblk[0-9]*|nvme[0-9]*|loop[0-9]*", ATTR{queue/rotational}=="0", ATTR{queue/scheduler}="none"
# set bfq scheduler for rotating disks
ACTION=="add|change", KERNEL=="sd[a-z]", ATTR{queue/rotational}=="1", ATTR{queue/scheduler}="bfq"
@tonylambiris
tonylambiris / ffmpeg-web-video-guide.md
Created March 31, 2018 01:51 — forked from jaydenseric/ffmpeg-web-video-guide.md
A quick guide to using FFmpeg to create cross-device web videos.

Video conversion with FFmpeg

Install

On mac:

  1. Download the latest release.
  2. Extract the binary and place it in /usr/local/bin.

Command basics

@tonylambiris
tonylambiris / serverdemo.go
Created April 24, 2018 02:16 — forked from fkautz/serverdemo.go
A simple demo of mixing various go http server and rpc using mux
package main
import (
"bytes"
"fmt"
"github.com/gorilla/mux"
grpc "github.com/gorilla/rpc"
"github.com/gorilla/rpc/json"
"log"
"net/http"
@tonylambiris
tonylambiris / README.md
Created May 8, 2018 23:10 — forked from Gabelbombe/README.md
Bypass EFI / NVRAM lock settings in OSX 10.12~

OSX 10.12~ NVRAM Manipulation

Begining with OS X 10.11 El Capitan, a set of security mechanism, System Integrity Protection(SIP), has been enforced and it can only be configured or turned off in the recovery environment like Recovery HD. In the normal environment, SIP configuration will not be permitted even with root privilege. If so, the SIP would be useless since it can be easily turned off.

As many people may already noticed, the configuration of SIP status is stored in the NVRAM with a property called csr-active-config. Of course users wouldn’t be

@tonylambiris
tonylambiris / alacritty-colors.yaml
Created June 3, 2018 12:08 — forked from pirey/alacritty-colors.yaml
alacritty theme collection
# Colors (Nord)
# colors:
# # Default colors
# primary:
# background: '0x2E3440'
# foreground: '0xD8DEE9'
#
# # Normal colors
# normal:
# black: '0x3B4252'
@tonylambiris
tonylambiris / spotify.preload.c
Created September 5, 2018 16:39 — forked from mdierolf/spotify.preload.c
An LD_PRELOAD fix for a really stupid spotify problem
// Save this file somewhere as spotify.preload.c
// Then build the library:
// gcc -fPIC -shared -o ~/spotify.preload.so spotify.preload.c -ldl
// When you execute spotify, you need to preload this library, which wraps the "setsockopt" function call with another function that gives spotify the results it expects:
// LD_PRELOAD=~/spotify.preload.so spotify
// To make the desktop icon work, edit: /usr/share/applications/spotify.desktop
// Change Exec=... to:
@tonylambiris
tonylambiris / colortrans.py
Created October 21, 2018 15:21 — forked from hoov/colortrans.py
Convert values between RGB hex codes and xterm-256 color codes.
#! /usr/bin/env python
""" Convert values between RGB hex codes and xterm-256 color codes.
Nice long listing of all 256 colors and their codes. Useful for
developing console color themes, or even script output schemes.
Resources:
* http://en.wikipedia.org/wiki/8-bit_color
* http://en.wikipedia.org/wiki/ANSI_escape_code