Skip to content

Instantly share code, notes, and snippets.

View TheZoc's full-sized avatar

Felipe Guedes TheZoc

  • London, United Kingdom
  • X @zoc
View GitHub Profile
@TheZoc
TheZoc / Compile line
Created May 31, 2016 03:26
gtk-win32 VS2015 command line output
C:\gtk-build\github\gtk-win32>c:\Python27\python.exe .\build.py build --vs-ver 14 -p x64 gtk3 > gtk3-build-log.txt
Microsoft (R) C/C++ Optimizing Compiler Version 19.00.23918 for x64
Copyright (C) Microsoft Corporation. All rights reserved.
cl ..\src\hb-blob.cc ..\src\hb-buffer-serialize.cc ..\src\hb-buffer.cc ..\src\hb-common.cc ..\src\hb-face.cc ..\src\hb-font.cc ..\src\hb-ot-tag.cc ..\src\hb-set.cc ..\src\hb-shape.cc ..\src\hb-shape-plan.cc ..\src\hb-shaper.cc ..\src\hb-unicode.cc ..\src\hb-warning.cc ..\src\hb-fallback-shape.cc ..\src\hb-ot-font.cc ..\src\hb-ot-layout.cc ..\src\hb-ot-map.cc ..\src\hb-ot-shape.cc ..\src\hb-ot-shape-complex-arabic.cc ..\src\hb-ot-shape-complex-default.cc ..\src\hb-ot-shape-complex-hangul.cc ..\src\hb-ot-shape-complex-hebrew.cc ..\src\hb-ot-shape-complex-indic.cc ..\src\hb-ot-shape-complex-indic-table.cc ..\src\hb-ot-shape-complex-myanmar.cc ..\src\hb-ot-shape-complex-thai.cc ..\src\hb-ot-shape-complex-tibetan.cc ..\src\hb-ot-shape-complex-use.cc ..\src\hb-ot-shape-complex
@TheZoc
TheZoc / LUIAura-Stalker-Auras.json
Created July 26, 2017 08:01
Wildstar - Stalker Auras for LUI Aura
{"setting":{"duration":{"color":{"a":255,"r":255,"g":255,"b":255}},"border":{"sprite":"sprPP_ListGlowBase","color":{"a":255,"r":255,"g":255,"b":255},"enable":true},"auras":[{"behavior":"All","text":{"font":"CRB_Interface14_B","source":"1-Class Resource","position":"TC","align":"Center","anchor":"IB","input":"{v}"},"name":"Suit Power","triggers":[{"triggerType":"Attribute","border":{"color":{"a":255,"b":255,"g":255,"r":255}},"attributes":{"Class Resource":{"value":0,"enable":true,"percent":true,"operator":">="}},"unit":"Player","name":"Suit Power"}],"icon":{"enable":false},"bar":{"color_bg":{"a":0,"r":0,"g":0,"b":0},"color_fill":{"a":125,"r":207,"g":62,"b":244},"posY":36,"sprite_border":"border_medium","enable":true,"color_border":{"a":50,"r":0,"g":0,"b":0},"border_size":5,"posX":-200,"color_empty":{"a":50,"r":196,"g":62,"b":244},"invert":true,"source":"1-Class Resource"}},{"overlay":{"color":{"a":191.25,"r":255},"shape":"Solid","source":"1"},"duration":{"source":"2-1"},"stacks":{"posY":0,"posX":0},"interval":

Keybase proof

I hereby claim:

  • I am thezoc on github.
  • I am zoc (https://keybase.io/zoc) on keybase.
  • I have a public key ASA3UiCUNY2hWU1jdkqaHWLAzmws2i1M35JzRUkeQlk9cwo

To claim this, I am signing this object:

@TheZoc
TheZoc / crab-fix.py
Created May 24, 2018 02:23
A small script to help revert the damage caused by crab ransomware
#!/usr/bin/python3
#
# .crab file fixer
# This small script was created to help a friend who got attacked by a ransomware
# I hope this helps someone else out there :)
#
import os
from glob import glob
@TheZoc
TheZoc / contrast-snippet.qml
Created November 26, 2019 11:16
Qt QML High Contrast functions
// I wrote those for a dialog in QML that needed to keep high contrast while the background color could be customized
// by the user. I"m keeping it here in case I need it in the future :)
/**
* Calculates the relative luminance of given color
* Reference: https://www.w3.org/TR/WCAG20/#relativeluminancedef
*
* @param {color} color Color to calculate the relative luminance.
* @return Luminance, as a real between 0 and 1
*/
@TheZoc
TheZoc / snippet.cpp
Last active January 22, 2020 11:12
Q_PROPERTY with functions (Qt Creator Snippet)
Q_PROPERTY($type$ $name$ READ $name:c$ WRITE Set$name:c$ NOTIFY $name$Changed)
$type$ $private_variable$_;
$type$ $name:c$() const { return $private_variable$_; }
void Set$name:c$(const $type$& $private_variable$)
{
if ($private_variable$_ == $private_variable$)
return;
@TheZoc
TheZoc / setup.bat
Last active March 25, 2020 18:34
Automatic python virtual environment setup for Windows
rem ===============================================================
rem Automatic python virutal environment setup for Windows
rem Felipe "Zoc" Silveira - Apr 2019
rem ---------------------------------------------------------------
rem https://gist.github.com/TheZoc/fa690df3ec4cca7a992fe49b97c47cac
rem ===============================================================
@echo off
rem Check if we already have a venv folder. If so, stop and exit
;
; AutoHotkey "Raw Input" listing and capture
; You can get the latest version of this file at:
; https://gist.github.com/TheZoc/4bf163aa9a9922b21fbf
;
;==========================================================================================================================================
; Please, if you make a significant change, fix or would like to improve this script,
; I'd really appreciate if you can contact me so we can merge both works :)
;==========================================================================================================================================
;
@TheZoc
TheZoc / sublime_text_setup.bat
Last active January 26, 2023 18:08
Sublime Text right click context menu and PATH variable setup (Windows)
@ECHO off
REM ===========================================================================
REM Sublime Text - Path and Right Click context menu
REM Felipe Guedes - https://github.com/TheZoc
REM https://gist.github.com/TheZoc/e3295df094801fa937596964499ac048
REM ---------------------------------------------------------------------------
REM I've swapped my environment so many times recently, that I decided to write
REM this overengineered solution to add Sublime Text 3 to the right click menu
REM on Windows, and to add it to the current user PATH environment variable
REM allowing `subl.exe` to be easily usable from command line.

Archlinux + Docker + Pi Hole

This is a guideline on how to setup Pi Hole in ArchLinux.

For this, I used a Raspberry Pi 4b with 8gb ram, using aarch64 version of ArchLinux.

This can also be done using a Raspberry Pi Zero, though I haven't tested myself (yet).

References: