Skip to content

Instantly share code, notes, and snippets.

View jaspreetsidhu's full-sized avatar
🎯
Focusing

Jaspreet jaspreetsidhu

🎯
Focusing
View GitHub Profile
@CoolElectronics
CoolElectronics / chromeos-117-sudo-howto.md
Last active April 10, 2024 08:41
Re-Enable sudo from crosh on R117+ Chrome OS without recompiling

Short guide on how to bypass this:

image

If you haven't disabled rootfs verification, switch to vt-2 and run /usr/libexec/debugd/helpers/dev_features_rootfs_verification. Then reboot.

Inside crostini, download minioverride.c and compile it with gcc minioverride.c -o minioverride.so -shared (make sure gcc is installed)

In the files app, move minioverride.so into your downloads folder.

@slavistan
slavistan / cuda-ready-archlinux-for-wsl2.md
Last active April 9, 2024 08:05
CUDA-ready Archlinux for WSL2

This is a brief guide on how to install Archlinux as a WSL2 distribution and how to set up CUDA afterwards.

As of late, Window's WSL2 offers GPU passthrough from WSL2/Linux to Windows for NVidia graphics cards which allows to run (and develop) CUDA-based applications on the WSL2/Linux-side with almost native performance. Unfortunately, the official guides for the CUDA setup for WSL2/Linux are predominantly Ubuntu-specific. Here's to you, Arch!

1. Install Archlinux

  1. Make sure that your Windows meets the dependencies and that your WSL2 is set up. See these instructions.

Archlinux is not among the default distributions available for WSL2. We'll install it from a tarball instead, a functionality offered natively by the WSL.

@Bnux256
Bnux256 / Crostini.md
Last active December 26, 2023 09:04
Chromebook Crostini Python Development Setup

Chromebook Crostini Python Development Setup

Updating the Debian container

sudo apt update
sudo apt dist-upgrade

Installing Nano

sudo apt install nano

Installing Python

sudo apt-get install python3 python3-dev python3-pip\

@n0531m
n0531m / install_basics.sh
Last active December 26, 2023 01:51
setting up my chromebook
##!/bin/bash
## setting up the least to a clean linux env on a chromebook
## mostly a copy&paste from instructions found on the web, which is why the approach is not consistent...
## i might clean it up in the future but as long as it works it does the job.
sudo apt-get update
sudo apt-get upgrade
sudo apt-get install apt-transport-https ca-certificates gnupg software-properties-common apt-utils
@OoHerbethoO
OoHerbethoO / Smartphone USB Tethering to an OpenWrt router
Created July 12, 2020 15:09
USB tethering is used to connect your OpenWrt Router to the Internet by using the your smartphone. It's more convenient and has better performance (lower latency) than turning your smartphone into an access point and using that. It also is less of a CPU load on your phone, charges your phone, and allows you the flexibility of doing things with y…
Installation
For the easiest installation, have a wired ethernet upstream internet connection to boot-strap this process. You will need: the router, your tethering phone, necessary cables, a laptop and an upstream internet connection via ethernet for initial setup. Instead of a wired upstream connection to plug into the router WAN port, is also possible to download necessary packages below, through your laptop while tethered to your phone, the same way you can get the OpenWrt distribution for your router. That is not covered in this guide.
Once OpenWRT is installed on the router,
Install some Kernel packages to get USB tethering support: Go to http://192.168.1.1 and log in to the router. Click on System, Administration, and SSH. Set the 'Interface' to 'LAN', then click 'Save & Apply'. You can now use an SSH client like Putty to connect to the router and issue commands. SSH into the router on 192.168.1.1 and log in.
Enter the commands:
opkg update
@magn2o
magn2o / wpa_supplicant.sh
Created February 10, 2020 02:25
init.d style service script for wpa_supplicant on the UDMPro.
#!/bin/sh
set -eu -o pipefail
CONTAINER_NAME="wpa_supplicant"
IMAGE_NAME="pbrah/wpa_supplicant-udmpro"
IMAGE_TAG="v1.0"
MAC_ADDRESS=""
ETH_IFACE="eth8"
@thibaultmol
thibaultmol / .crostini-setup
Last active January 24, 2024 21:44 — forked from tjpalanca/.crostini-setup
Crostini Setup
These scripts set up Crostini on my Acer Chromebook Spin 13
wget https://gist.githubusercontent.com/thibaultmol/aaf275a0bb36ba4aa8481e845aeb3135/raw/setup-crostini.sh \
&& chmod +x ./setup-crostini.sh
@jaspreetsidhu
jaspreetsidhu / Pardot Javascript
Created May 22, 2019 12:56
Pardot Javascript UTM
<script type="text/javascript">
// Parse the URL
function getParameterByName(name) {
name = name.replace(/[\[]/, "\\[").replace(/[\]]/, "\\]");
var regex = new RegExp("[\\?&]" + name + "=([^&#]*)"),
results = regex.exec(location.search);
return results === null ? "" : decodeURIComponent(results[1].replace(/\+/g, " "));
}
// Give the URL parameters variable names
var source = getParameterByName('utm_source');

[AIO] Ultimate AdBlocking+AdBypassing Guide (Firefox/Chrome/Brave - Windows/Linux)

Last Updated: September 12, 2023

Why We Need To Block Ads From Internet?

The Internet is a vast space of infinite knowledge. We can store and access those knowledge, those data from everywhere and from any device. We just need to use correct words or phrases to find them. But often what we get is not exactly Safe to See, it's not annoyance-free.

@sjfricke
sjfricke / ChromeBookDev.md
Last active December 26, 2023 01:53
Configuring Chromebook for Development

These instructions will not work on Chromebooks with an ARM processor. If you have an ARM processor then you cannot install Chromebrew to get git. You'll need to instead install crouton. Here are instructions that you can follow: https://github.com/macton/arch-linux-install-notes/tree/master/arm-chromebook-chroot

@Note: This is a fork from /erikpmp who has left github, here is a fork I took before thankfully

Configuring Chromebook for Development

After a full Sunday of trial and error, and stepping through many semi-complete or dated blog posts explaining how to do this, I was able to get the Chromebook into developer mode, install git, Node.js, and NPM.

Here's what I did...