Skip to content

Instantly share code, notes, and snippets.

Felipe "Zoc" Silveira TheZoc

Block or report user

Report or block TheZoc

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@TheZoc
TheZoc / contrast-snippet.qml
Created Nov 26, 2019
Qt QML High Contrast functions
View contrast-snippet.qml
// 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 / crab-fix.py
Created May 24, 2018
A small script to help revert the damage caused by crab ransomware
View crab-fix.py
#!/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
View keybase.md

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 / LUIAura-Stalker-Auras.json
Created Jul 26, 2017
Wildstar - Stalker Auras for LUI Aura
View LUIAura-Stalker-Auras.json
{"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":
@TheZoc
TheZoc / Compile line
Created May 31, 2016
gtk-win32 VS2015 command line output
View Compile line
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 / mp3-to-m4r.bat
Created Jun 25, 2015
Convert a MP3 file to an Apple iPhone's ringtone file (M4R), using FFMPEG.
View mp3-to-m4r.bat
@echo off
rem =====================================================
rem Converts a MP3 file to a M4R file using ffmpeg.
rem Usage: Drop a MP3 file at the top of this batch file.
rem =====================================================
set ffmpeg_exe="C:\ffmpeg\ffmpeg-20150619-git-bb3703a-win64-static\bin\ffmpeg.exe"
rem %~f1 = Full File Path, with drive letter
rem %~p1 = Drive Letter
rem %~p1 = Path Only
View RawInputList.ahk
;
; 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 :)
;==========================================================================================================================================
;
View AppleWKRemapper.ahk
;
; Apple Wireless Keyboard Eject Key and Function kKey remapper for Windows.
; You can get the latest version of this file at:
; https://gist.github.com/TheZoc/a913642e9bedf62ba3ef
;
;==========================================================================================================================================
; 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 :)
;==========================================================================================================================================
;
You can’t perform that action at this time.