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 / 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 / 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 / nes.py
Created January 1, 2019 20:10 — forked from fuzyll/nes.py
Updated version of Binary Ninja's NES plugin (tries to handle more mappers).
# Copyright (c) 2015-2016 Vector 35 LLC
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to
# deal in the Software without restriction, including without limitation the
# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
# sell copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included in
@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 / switcher.ahk
Created September 23, 2019 14:24 — forked from snmishra/switcher.ahk
Switch windows by process name using Alt+` and S
; Based on https://superuser.com/a/768060/542406
!`:: ; Next window
WinGet, ActiveProcessName, ProcessName, A
WinGet, WinClassCount, Count, ahk_exe %ActiveProcessName%
IF WinClassCount = 1
Return
Else
WinSet, Bottom,, A
WinActivate, ahk_exe %ActiveProcessName%
return