Skip to content

Instantly share code, notes, and snippets.

@loochao
loochao / setup.sh
Created January 28, 2023 23:18 — forked from bradp/setup.sh
New Mac Setup Script
echo "Creating an SSH key for you..."
ssh-keygen -t rsa
echo "Please add this public key to Github \n"
echo "https://github.com/account/ssh \n"
read -p "Press [Enter] key after this..."
echo "Installing xcode-stuff"
xcode-select --install
@loochao
loochao / syncthing_ubuntu-mint_headless.md
Created November 24, 2022 18:45 — forked from pjobson/syncthing_ubuntu-mint_headless.md
Syncthing Ubuntu/Mint Headless

Syncthing Ubuntu/Mint Headless

Syncthing: https://syncthing.net/

Syncthing is a free, open-source peer-to-peer file synchronization application available for Windows, Mac, Linux, Android, Solaris, Darwin, and BSD. It can sync files between devices on a local network, or between remote devices over the Internet. Data security and data safety are built into the design of the software.

This is written using Linux Mint 18.1 Serena x86_64 using kernel 4.4.0-139-generic.

I couldn't find good directions for doing this, so here we go.

@loochao
loochao / gist:0455517b67e09a11a4a69f0f92c833bf
Created November 3, 2022 16:46 — forked from craigminihan/gist:b23c06afd9073ec32e0c
Build GCC 4.9.2 for C/C++ on CentOS 7
sudo yum install libmpc-devel mpfr-devel gmp-devel
cd ~/Downloads
curl ftp://ftp.mirrorservice.org/sites/sourceware.org/pub/gcc/releases/gcc-4.9.2/gcc-4.9.2.tar.bz2 -O
tar xvfj gcc-4.9.2.tar.bz2
cd gcc-4.9.2
./configure --disable-multilib --enable-languages=c,c++
make -j 4
make install
@loochao
loochao / reclaimWindows10.ps1
Created October 18, 2022 08:43 — forked from alirobe/reclaimWindows10.ps1
This Windows 10 Setup Script turns off a bunch of unnecessary Windows 10 telemetery, bloatware, & privacy things. Not guaranteed to catch everything. Review and tweak before running. Reboot after running. Scripts for reversing are included and commented. Fork of https://github.com/Disassembler0/Win10-Initial-Setup-Script (different defaults). N.…
##########
# Tweaked Win10 Initial Setup Script
# Primary Author: Disassembler <disassembler@dasm.cz>
# Modified by: alirobe <alirobe@alirobe.com> based on my personal preferences.
# Version: 2.20.2, 2018-09-14
# Primary Author Source: https://github.com/Disassembler0/Win10-Initial-Setup-Script
# Tweaked Source: https://gist.github.com/alirobe/7f3b34ad89a159e6daa1/
# Tweak difference:
#
# @alirobe's version is a subset focused on safely disabling telemetry, some 'smart' features and 3rd party bloat ...
@loochao
loochao / crawler.py
Created September 8, 2022 09:34 — forked from vinovator/crawler.py
Crawl a page and extract all urls recursively within same domain
# crawler.py
# Python 2.7.6
"""
Crawl a page and extract all urls recursively within same domain
"""
from BeautifulSoup import BeautifulSoup
@loochao
loochao / java_download.sh
Created August 9, 2022 07:19 — forked from wavezhang/java_download.sh
download java from oracle without login
wget -c --no-cookies --no-check-certificate --header "Cookie: oraclelicense=accept-securebackup-cookie" https://download.oracle.com/otn-pub/java/jdk/12.0.2+10/e482c34c86bd4bf8b56c0b35558996b9/jdk-12.0.2_linux-x64_bin.tar.gz
@loochao
loochao / post-install-mint-ubuntu.sh
Created August 3, 2022 00:51 — forked from thiagomgo/post-install-mint-ubuntu.sh
Post-installation script for Linux Mint/Ubuntu
# Sudo without password
sudo visudo
username ALL=(ALL) NOPASSWD: ALL # At the end of the file
# Get the latest updates
sudo add-apt-repository universe
sudo apt-get update
sudo apt-get -y upgrade
# Manage the repositories that you install
@loochao
loochao / build_emacs.sh
Created January 26, 2022 01:07 — forked from kiennq/build_emacs.sh
Build emacs-snapshot on Ubuntu 18.04
git clone --single-branch --depth=1 https://github.com/emacs-mirror/emacs.git
cd emacs/
sudo apt install -y autoconf make gcc texinfo libxpm-dev \
libjpeg-dev libgif-dev libtiff-dev libpng-dev libgnutls28-dev \
libncurses5-dev libjansson-dev libharfbuzz-dev
./autogen.sh
./configure --with-json --with-modules --with-harfbuzz --with-compress-install \
--with-threads --with-included-regex --with-zlib --with-cairo --without-rsvg\
--without-sound --without-imagemagick --without-toolkit-scroll-bars \
--without-gpm --without-dbus --without-makeinfo --without-pop \
@loochao
loochao / TerminusBold-Powerline.ttf
Created January 25, 2022 22:55 — forked from cscorley/TerminusBold-Powerline.ttf
Terminus (TTF) for Powerline
@loochao
loochao / ArchLinuxWSL2.md
Created January 15, 2022 11:34 — forked from ld100/ArchLinuxWSL2.md
Steps for setting up Arch Linux on WSL2

Migrating from Ubuntu on WSL to ArchLinux on WSL2

Upgrading to WSL 2

  • Download WSL2 Kernel
  • run wsl --set-default-version 2 in windows command line, so that all future WSL machine will use WSL2.

Installing Arch Linux