Skip to content

Instantly share code, notes, and snippets.

@youngyou
youngyou / download-vs-code-server.sh
Created May 11, 2021 09:53 — forked from b01/download-vs-code-server.sh
Linux script to download latest VS Code Server, good for Docker (tested in Alpine).
#!/bin/sh
set -e
# You can get the latest commit SHA by looking at the latest tagged commit here: https://github.com/microsoft/vscode/releases
commit_sha="08a217c4d27a02a5bcde898fd7981bda5b49391b"
archive="vscode-server-linux-x64.tar.gz"
owner='microsoft'
repo='vscode'
# Auto-Get the latest commit sha via command line.
@youngyou
youngyou / oh-my-zsh on openwrt or lede-project.md
Created July 31, 2019 13:18 — forked from fire1ce/oh-my-zsh on openwrt or lede-project.md
Install oh-my-zsh on openwrt/lede-project
opkg update && opkg install ca-certificates zsh curl git-http
sh -c "$(curl -fsSL https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh)" 
sed -i -- 's:/bin/ash:/usr/bin/zsh:g' /etc/passwd


# -- reboot, all done. 
@youngyou
youngyou / command.sh
Last active May 3, 2018 14:43 — forked from peterdemartini/command.sh
Exclude node_modules in timemachine
find `pwd` -maxdepth 3 -type d -name 'node_modules' | xargs -n 1 tmutil addexclusion
@youngyou
youngyou / karma-typescript-config.js
Created September 6, 2017 03:56
karma typescript config
module.exports = function (config) {
config.set({
frameworks: ['jasmine', "karma-typescript"],
files: [
'node_modules/babel-polyfill/dist/polyfill.js',
{ pattern: "test/**/*.ts" },
{ pattern: "src/**/*.ts" }
],
preprocessors: {
"**/*.ts": ["karma-typescript"]
@youngyou
youngyou / purge.sh
Created September 30, 2016 03:42 — forked from adrienbrault/purge.sh
Script to reduce VM size before packaging for vagrant
#!/bin/sh
# Credits to:
# - http://vstone.eu/reducing-vagrant-box-size/
# - https://github.com/mitchellh/vagrant/issues/343
aptitude -y purge ri
aptitude -y purge installation-report landscape-common wireless-tools wpasupplicant ubuntu-serverguide
aptitude -y purge python-dbus libnl1 python-smartpm python-twisted-core libiw30
aptitude -y purge python-twisted-bin libdbus-glib-1-2 python-pexpect python-pycurl python-serial python-gobject python-pam python-openssl libffi5
$OutputEncoding = New-Object -typename System.Text.UTF8Encoding
[Console]::OutputEncoding = New-Object -typename System.Text.UTF8Encoding
# RUN EACH LINE INDEPENDENTLY. THIS IS NOT AN AUTOMATIC BASH SCRIPT.
# Install dependencies
apt-get install -y git-core gcc make autoconf yodl libncursesw5-dev texinfo checkinstall
# Clone zsh repo and change to it
git clone https://github.com/zsh-users/zsh.git zsh; cd zsh
# BashOnUbuntuOnWindows installs zsh 5.0.2
# You can use another version as well