Skip to content

Instantly share code, notes, and snippets.

View braian87b's full-sized avatar

braian87b

View GitHub Profile
@nichtich
nichtich / README.md
Last active April 18, 2024 12:59
Ubuntu at Lenovo ThinkPad P14s

Install and setup Ubuntu at a new Lenovo ThinkPad P14s Gen 3 with NVIDIA T550.

Lenovo is certified for Ubuntu

Lenovo provides a short document how to install Ubuntu 20.04

  • Enter BIOS and disable secure boot, to boot from USB Stick
  • Install Ubuntu, with "Install third-party software" enabled to include NVIDIA drivers

Update firmware

@koczaj
koczaj / Iomega_ez_debian_5.2.9
Last active February 25, 2021 16:49
Iomega_ez_debian_5.2.9
##based on braian87b/pure_debian_on_iomega_ez.sh https://gist.github.com/braian87b/b5a4c5f20d1112473c470b096df766a3#file-pure_debian_on_iomega_ez-sh-L114
#download rootfs
root@osmc:/home/osmc/529# wget https://www.dropbox.com/s/pa2cbg93qgcnp8w/Debian-5.2.9-kirkwood-tld-1-rootfs-bodhi.tar.bz2
root@osmc:/home/osmc/529# mkdir Debian-5.2.9-kirkwood-tld-1-rootfs-bodhi
root@osmc:/home/osmc/529# tar -jxvf Debian-5.2.9-kirkwood-tld-1-rootfs-bodhi.tar.bz2 -C Debian-5.2.9-kirkwood-tld-1-rootfs-bodhi
# These are the files:
root@osmc:/home/osmc/529# ls -lht ./Debian-5.2.9-kirkwood-tld-1-rootfs-bodhi
# Generate your identity key on openwrt
dropbearkey -t rsa -f ~/.ssh/id_rsa
# Convert public key from dropbear binary to openssh text
# Copy and paste output from below to bitbucket account ssh keys
dropbearkey -y -f ~/.ssh/id_rsa | head -n 2 | tail -1
# Change git ssh command
echo "#!/bin/sh" > ~/.gitssh.sh
echo "dbclient -y -i ~/.ssh/id_rsa \$\*" >> ~/.gitssh.sh
#!/bin/sh
################################################################
# Individual channel setting per distinct AP
case `uci get system.@system[0].hostname` in
"ap1")
CHANNELS="36 1"
;;
"ap2")
@braian87b
braian87b / dumb-ap-wired-link.sh
Last active March 30, 2024 20:21
How to setup a Dumb AP, Wired backbone for OpenWRT / LEDE
# Generate your identity key on openwrt
dropbearkey -t rsa -f ~/.ssh/id_rsa
# Convert public key from dropbear binary to openssh text
# Copy and paste output from below to bitbucket account ssh keys
dropbearkey -y -f ~/.ssh/id_rsa | head -n 2 | tail -1
# Change git ssh command
echo "#!/bin/sh" > ~/.gitssh.sh
echo "dbclient -y -i ~/.ssh/id_rsa \$\*" >> ~/.gitssh.sh
chmod +x ~/.gitssh.sh
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
@nmcv
nmcv / sqlite_shell.py
Created June 9, 2014 17:19
Minimal SQLite shell from Python docs
# A minimal SQLite shell for experiments
import sqlite3
con = sqlite3.connect(":memory:")
con.isolation_level = None
cur = con.cursor()
buffer = ""
@vbajpai
vbajpai / opkgclean.sh
Last active March 5, 2024 17:06
If opkg runs out of space, it will not remove the files it was installing. Run this custom script in order recover the space by removing these files and the installed dependencies.
#!/bin/sh
#takes one argument/parameter: the name of the package which didn't install correctly and should be removed along with its dependencies
#do opkg update first
#example: ./opkgremovepartlyinstalledpackage.sh pulseaudio-daemon
#get list of all packages that would be installed along with package x
opkg update
PACKAGES=`opkg --force-space --noaction install $1 | grep http | cut -f 2 -d ' ' | sed 's/.$//'`
for i in $PACKAGES
do