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
Created March 8, 2018 03:01
Updated PKGBUILD for go-bindata
# Maintainer: Sven-Hendrik Haase <[email protected]>
# Contributor: Lubomir 'Kuci' Kucera <kuci24-at-gmail-dot-com>
pkgname=go-bindata
pkgver=3.3.0
pkgrel=1
pkgdesc="A small utility which generates Go code from any file"
arch=('x86_64')
url='https://github.com/shuLhan/go-bindata'
license=('CC0 1.0')
@tonylambiris
tonylambiris / disable_tracker.sh
Created March 7, 2018 01:40
Permanently disable tracker in GNOME
#!/bin/sh
echo -e "\nHidden=true\n" | sudo tee --append /etc/xdg/autostart/tracker-extract.desktop /etc/xdg/autostart/tracker-miner-apps.desktop /etc/xdg/autostart/tracker-miner-fs.desktop /etc/xdg/autostart/tracker-miner-user-guides.desktop /etc/xdg/autostart/tracker-store.desktop > /dev/null
gsettings set org.freedesktop.Tracker.Miner.Files crawling-interval -2
gsettings set org.freedesktop.Tracker.Miner.Files enable-monitors false
tracker reset --hard
@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 / steam-setup.sh
Last active May 9, 2018 02:04
Script for configuring Steam under Wine using winetricks
#!/usr/bin/env bash
curl -o "$HOME/bin/winetricks" \
https://raw.githubusercontent.com/Winetricks/winetricks/master/src/winetricks
chmod +x "$HOME/bin/winetricks"
while pgrep -fla '^(wine|C:\\).*exe'; do pkill -f '^(wine|C:\\).*exe'; sleep 1; done
rm -rf ~/.wine
regsvr32 wineasio.dll
wine64 regsvr32 wineasio.dll
@tonylambiris
tonylambiris / blocklists.sh
Created January 25, 2018 22:54
Merge all lists from iblocklist.com into one file
#!/bin/bash
curl -s https://www.iblocklist.com/lists.php \
| sed -n "s/.*value='\(http[^']*\)'.*/'\1'/p" \
| xargs -n 1 curl -sLo- | gunzip | egrep -v "^(#.*|^)$" \
> blocklist.txt
wc -l blocklist.txt
@tonylambiris
tonylambiris / PKGBUILD
Created January 18, 2018 21:38
PKGBUILD for bcc-0.5.0
pkgbase=bcc
pkgname=('bcc' 'bcc-tools' 'python-bcc' 'python2-bcc')
pkgver=0.5.0
pkgrel=1
pkgdesc="BPF Compiler Collection"
arch=('x86_64')
url="https://github.com/iovisor/bcc"
license=('Apache')
conflicts=('bcc-git')
makedepends=('cmake' 'clang>=3.7.0' 'llvm>=3.7.0' 'flex' 'bison' 'python'
@tonylambiris
tonylambiris / fix_build_issue_for_llvm_5.0.1.patch
Created January 18, 2018 21:37
fix_build_issue_for_llvm_5.0.1.patch
--- bcc-0.5.0/cmake/clang_libs.cmake.orig 2018-01-18 16:32:18.469420711 -0500
+++ bcc-0.5.0/cmake/clang_libs.cmake 2018-01-18 16:32:27.272819352 -0500
@@ -8,7 +8,7 @@
if (${_llvm_coroutines} GREATER -1)
list(APPEND llvm_raw_libs coroutines)
endif()
-if (${LLVM_PACKAGE_VERSION} VERSION_GREATER "5")
+if (${LLVM_PACKAGE_VERSION} VERSION_EQUAL 6 OR ${LLVM_PACKAGE_VERSION} VERSION_GREATER 6)
list(APPEND llvm_raw_libs bpfasmparser)
list(APPEND llvm_raw_libs bpfdisassembler)
@tonylambiris
tonylambiris / gdisk.md
Last active January 14, 2018 04:18
gdisk output for resizing an ntfs partition

Basic steps:

  • Find out recommended minimum size for Windows partition
  • Resize Windows partition to 1.5x the recommended minimum
  • Recreate Windows partition in gdisk
  • Finalize Windows partition resizing

IMPORTANT: In this example I allocate an additional megabyte when recreating the Windows partition in gdisk (search for +50146M)

root@archiso ~ # ntfsresize -m /dev/sda3
@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 / 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."