Skip to content

Instantly share code, notes, and snippets.

View W4RH4WK's full-sized avatar
🔱
A demon, killing demons

Alex Hirsch W4RH4WK

🔱
A demon, killing demons
View GitHub Profile
@victor-perez
victor-perez / git.bat
Last active August 4, 2021 14:16
Use WSL git inside VS Code from Windows 10 17046
@echo off
setlocal ENABLEEXTENSIONS ENABLEDELAYEDEXPANSION
::this also support calls that contains a absolute windows path
::check of one of the params contain a absolute windows path
echo.%* | findstr /r /c:"[a-z]:[\\/]" > nul
if %errorlevel% == 1 (
::if not just git with the given parameters
call :git %*
@hydren
hydren / custom_mix_pitch_func.h
Last active April 26, 2023 08:22
SDL_mixer chunk pitching C example
/*
* custom_mix_pitch_func.h
*
* Created on: 10 de jan de 2018
* Author: carlosfaruolo
*/
// Mix_EffectFunc_t callback that redirects to handler method (handler passed via user_data)
// Processing function to be able to change chunk speed/pitch.
// AUDIO_FORMAT_TYPE depends on the current audio format (queryable via Mix_QuerySpec)
@haasn
haasn / about:config.md
Last active April 2, 2024 18:46
Firefox bullshit removal via about:config

Firefox bullshit removal

Updated: Just use qutebrowser (and disable javascript). The web is done for.

@mtolly
mtolly / A.hs
Created July 15, 2015 18:06
Sample Haskell project using embedded Ruby as a preprocessor
module A where
@tvlooy
tvlooy / unit.sh
Last active February 4, 2024 04:20
Bash test: get the directory of a script
#!/bin/bash
function test {
MESSAGE=$1
RECEIVED=$2
EXPECTED=$3
if [ "$RECEIVED" = "$EXPECTED" ]; then
echo -e "\033[32m✔︎ Tested $MESSAGE"
else
@gfjardim
gfjardim / build.sh
Last active October 22, 2023 13:07
Build script for unRAID 6
#!/bin/bash
D="$(dirname "$(readlink -f ${BASH_SOURCE[0]})")"
BZROOT="/boot/bzroot"
URLS="
http://mirrors.slackware.com/slackware/slackware64-14.1/slackware64/d/gcc-4.8.2-x86_64-1.txz
http://mirrors.slackware.com/slackware/slackware64-14.1/slackware64/d/gcc-g++-4.8.2-x86_64-1.txz
http://mirrors.slackware.com/slackware/slackware64-14.1/patches/packages/glibc-2.17-x86_64-10_slack14.1.txz
http://mirrors.slackware.com/slackware/slackware64-14.1/slackware64/d/binutils-2.23.52.0.1-x86_64-2.txz
@Morley93
Morley93 / openvpn.md
Last active July 1, 2023 03:26
This is how you can take an openvpn .ovpn config file and extract the certificates/key required to import the profile into NetworkManager.

OpenVPN .ovpn manipulation.

This is how you can take an OpenVPN .ovpn config file and extract the certificates/keys required to import the profile into NetworkManager.

  • Download the .ovpn file. Save it somewhere you can store it permanently (I use ~/.vpn).
  • Copy from between <ca> tags into ca.crt, remove <ca> tags.
  • Copy from between <cert> tags into client.crt, remove <cert> tags.
  • Copy from between <key> tags into client.key, remove <key> tags.
  • Copy from between <tls-auth> tags into ta.key, remove <tls-auth> tags.
  • Remove the line "key-direction 1"
  • Above "# -----BEGIN RSA SIGNATURE-----" insert the following lines.
@nodesocket
nodesocket / bootstrap.flatten.css
Last active April 1, 2021 23:37
Below are simple styles to "flatten" bootstrap. I didn't go through every control and widget that bootstrap offers, only what was required for https://commando.io, so your milage may vary.
/* Flatten das boostrap */
.well, .navbar-inner, .popover, .btn, .tooltip, input, select, textarea, pre, .progress, .modal, .add-on, .alert, .table-bordered, .nav>.active>a, .dropdown-menu, .tooltip-inner, .badge, .label, .img-polaroid {
-moz-box-shadow: none !important;
-webkit-box-shadow: none !important;
box-shadow: none !important;
-webkit-border-radius: 0px !important;
-moz-border-radius: 0px !important;
border-radius: 0px !important;
border-collapse: collapse !important;
background-image: none !important;
@dypsilon
dypsilon / frontendDevlopmentBookmarks.md
Last active March 27, 2024 06:36
A badass list of frontend development resources I collected over time.
@bradley219
bradley219 / .gitignore
Last active April 9, 2024 09:03
PID C++ implementation
.DS_Store