Skip to content

Instantly share code, notes, and snippets.

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

Rotsen Mark Acob webdevsuperfast

🏠
Working from home
View GitHub Profile
@himalay
himalay / auto-dns.sh
Last active July 9, 2023 13:14
[Pi-hole auto DNS switch] The script automatically switches the DNS servers between Pi-hole and Cloudflare based on Pi-hole DNS Server status. #pihole #openwrt
#!/bin/sh
# The script automatically switches the DNS servers between Pi-hole and Cloudflare based on Pi-hole DNS Server status.
TARGET=192.168.0.7 # Pi-hole
FALLBACK_A=1.1.1.1 # Cloudflare
FALLBACK_B=1.0.0.1 # Cloudflare
function set_fallback_dns() {
echo $(date)

Installing ipFire on a Raspberry Pi 3 b+

Sharp language ahead, but i was infuriated at getting openWRT to work before this. Go away if you're easily offended.

Step 1: Download ipFire

I have mirrored the version I've been using for this guide. Though i encourage you to download the latest one.

Mirror: https://drive.google.com/open?id=1u--Ynws2FTW4X1oycYXp2xOZ4B8pvRt6

@florido
florido / .zsh_plugins.txt
Created January 14, 2019 14:40
ZSH setup and plugins I use with http://getantibody.github.io/
# Bundles from the default repo (robbyrussell's oh-my-zsh).
robbyrussell/oh-my-zsh folder:plugins/git
robbyrussell/oh-my-zsh folder:plugins/github
robbyrussell/oh-my-zsh folder:plugins/heroku
robbyrussell/oh-my-zsh folder:plugins/lein
robbyrussell/oh-my-zsh folder:plugins/command-not-found
# robbyrussell/oh-my-zsh folder:plugins/common-aliases
robbyrussell/oh-my-zsh folder:plugins/autojump
robbyrussell/oh-my-zsh folder:plugins/compleat
@infval
infval / emuparadise.download.user.js
Last active April 10, 2024 23:22
emuparadise.me download workaround (Most games + Sega Dreamcast, Books/Comics/Guides/Magazines)
// ==UserScript==
// @name EmuParadise Download Workaround
// @version 1.2.3
// @description Replaces the download button link with a working one
// @author infval (Eptun)
// @match https://www.emuparadise.me/*/*/*
// @grant none
// ==/UserScript==
// https://www.reddit.com/r/Piracy/comments/968sm6/a_script_for_easy_downloading_of_emuparadise_roms/
@j1cs
j1cs / register.md
Last active January 22, 2024 19:26
Fix brightness control for Intel HD Graphics 4000 (at lease samsung XE700T1C)

Windows

Currently reads as :

[HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Control\Class{4d36e968-e325-11ce-bfc1-08002be10318}\0000] "FeatureTestControl"= "Edit DWORD 32 bit"= f000

Registry with New Value:

You needed to change the value in registry to:(f008)

[HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Control\Class{4d36e968-e325-11ce-bfc1-08002be10318}\0000] "FeatureTestControl"="Edit DWORD 32 bit"=f008

@jjvillavicencio
jjvillavicencio / setup.sh
Last active April 22, 2024 21:22
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
@jeromecoupe
jeromecoupe / webstoemp-gulpfile.js
Last active January 21, 2024 16:28
Gulp 4 sample gulpfile.js. For a full explanation, have a look at https://www.webstoemp.com/blog/switching-to-gulp4/
"use strict";
// Load plugins
const autoprefixer = require("autoprefixer");
const browsersync = require("browser-sync").create();
const cp = require("child_process");
const cssnano = require("cssnano");
const del = require("del");
const eslint = require("gulp-eslint");
const gulp = require("gulp");
@nijicha
nijicha / install_nodejs_and_yarn_homebrew.md
Last active January 30, 2024 12:14
Install NVM, Node.js, Yarn via Homebrew
@YagoLopez
YagoLopez / deep-search-javascript-object.js
Last active January 8, 2023 10:02
Deep search javascript object
/* Attribution: http://techslides.com/how-to-parse-and-search-json-in-javascript */
//return an array of objects according to key, value, or key and value matching
function getObjects(obj, key, val) {
var objects = [];
for (var i in obj) {
if (!obj.hasOwnProperty(i)) continue;
if (typeof obj[i] == 'object') {
objects = objects.concat(getObjects(obj[i], key, val));
} else