Skip to content

Instantly share code, notes, and snippets.

View jnettome's full-sized avatar
🏠
Working from home

João Pedro Netto jnettome

🏠
Working from home
View GitHub Profile
@swayducky
swayducky / cursor
Last active October 2, 2025 20:14
This fixes using "cursor" command in WSL
#!/usr/bin/env sh
# LATEST VERSION OF THIS SCRIPT: https://gist.github.com/swayducky/8ba8f2db156c7f445d562cdc12c0ddb4
# FORKED FROM: https://gist.github.com/ddwang/0046da801bcb29d241869d37ad719394
# 1) No longer has a hard-coded COMMIT
# 2) Auto-symlinks a "code" script to avoid wslCode.sh breaking
# HOW TO INSTALL:
# 1) Remove "c:\Users\<USER_NAME>\AppData\Local\Programs\cursor\resources\app\bin" from Windows Environment Settings
# 2) Modify this script with your Windows <USER_NAME> (NOT your WSL username) in the VSCODE_PATH variable
@BusterNeece
BusterNeece / video_stream.liq
Last active June 26, 2025 18:43
Liquidsoap 2.1 Video Stream with HLS
# Update:
# I am moving this script back to its original home as part of the AzuraCast repository:
# https://github.com/AzuraCast/radio-video-stream
# --
# See updated instructions there.
@jonpulsifer
jonpulsifer / toggle-virtualization.bat
Last active September 25, 2024 16:11
Virtualization must be disabled to use CS:GO anti-cheat clients like FACEIT and ESEA, but I like to use WSL2 and Docker, and this script helps me do that
@echo off
echo Virtualization must be disabled to use anti-cheat clients like FACEIT and ESEA
echo.
net session >nul 2>&1
if %ERRORLEVEL% EQU 0 goto :chchchchoices
echo This script requires elevated privileges. Re-run as Administrator to continue
goto :exit
:chchchchoices
@ericek111
ericek111 / csgo.c
Created November 20, 2020 02:30
CS:GO voice demo parser
#include <unistd.h>
#include <stdlib.h>
#include <math.h>
#include <stdio.h>
#include <stdint.h>
#include <sys/time.h>
#include <celt.h>
// gcc -o csgo csgo.c -I./celt-0.11.1/libcelt -L"$HOME/.steam/steam/steamapps/common/Counter-Strike Global Offensive/bin/linux64" -l:vaudio_celt_client.so && ./csgo && play -t raw -r 22050 -e signed -b 16 -c 1 out.raw
@codebryo
codebryo / headway.vue
Created October 12, 2018 08:15
Loading Headway as Vue Widget
<template>
<div v-click-outside="hide" class="changelog">
<div class="anchor"><!-- This is a Icon we use --></div>
</div>
</template>
<script>
import uuid from 'uuid/v4'
import ClickOutside from 'vue-click-outside'
const log = console.log;
import demofile = require("demofile");
import * as fs from "fs";
if (process.argv.length < 3) {
log("Specify the full path to a demo");
log("e.g.: ./index.js ~/test.dem");
@jjvillavicencio
jjvillavicencio / setup.sh
Last active December 3, 2025 05:16
Install Android SDK on Windows Bash (WSL)
cd /home/<user>/
sudo apt-get install unzip
wget https://dl.google.com/android/repository/sdk-tools-linux-4333796.zip
unzip sdk-tools-linux-4333796.zip -d Android
rm sdk-tools-linux-4333796.zip
sudo apt-get install -y lib32z1 openjdk-8-jdk
export JAVA_HOME=/usr/lib/jvm/java-8-openjdk-amd64
export PATH=$PATH:$JAVA_HOME/bin
printf "\n\nexport JAVA_HOME=/usr/lib/jvm/java-8-openjdk-amd64\nexport PATH=\$PATH:\$JAVA_HOME/bin" >> ~/.bashrc
cd Android/tools/bin
@fedme
fedme / Ionic Android Development on WSL.md
Last active November 5, 2024 05:37
Ionic Android Development on WSL (Windows Subsystem for Linux)

Ionic Android Development on WSL

Installing the required software

Execute the following commands to install Node, npm, git, Java, Ionic, Cordova and Angular CLI:

cd ~
sudo apt update
sudo apt upgrade
@diarcastro
diarcastro / how-to-use-it.js
Last active May 16, 2018 12:44
Provider to handle cordova-plugin-ionic-keyboard
// Include it on your module's providers
import { KeyboardProvider } from 'providers/keyboard/keyboard.ts'
@NgModule({
providers: [
...
, KeyboardProvider
]
});
@dylanmckay
dylanmckay / facebook-contact-info-summary.rb
Last active July 3, 2025 21:22
A Ruby script for collecting phone record statistics from a Facebook user data dump
#! /usr/bin/env ruby
# NOTE: Requires Ruby 2.1 or greater.
# This script can be used to parse and dump the information from
# the 'html/contact_info.htm' file in a Facebook user data ZIP download.
#
# It prints all cell phone call + SMS message + MMS records, plus a summary of each.
#
# It also dumps all of the records into CSV files inside a 'CSV' folder, that is created