Skip to content

Instantly share code, notes, and snippets.

View wongsyrone's full-sized avatar
😂
Babysitting

Syrone Wong wongsyrone

😂
Babysitting
View GitHub Profile
@wongsyrone
wongsyrone / 1027.c
Last active January 31, 2018 06:11
PAT 打印沙漏
/*
1027. 打印沙漏(20)
本题要求你写个程序把给定的符号打印成沙漏的形状。例如给定17个“*”,要求按下列格式打印
*****
***
*
***
*****
Yaourt is just wrapper around pacman and other utilities, e.g. cURL. If you want to download essential files such as PKGBUILDs, just pass
environments.
$ http_proxy=10.1.10.40:808 https_proxy=10.1.10.40:808 yaourt -S customizepkg
@wongsyrone
wongsyrone / part2.sh
Last active January 21, 2018 15:21 — forked from fgoinai/part2.sh
ln -sf /usr/share/zoneinfo/$(tzselect) /etc/localtime
hwclock --systohc
nano /etc/locale.gen && locale-gen
read -p "Default LANG is? [en_US,zh_CN...]" loc
echo "LANG=$loc.UTF-8" >> /etc/locale.conf
read -p "Hostname is?" hn
echo $hc > /etc/hostname
echo "127.0.1.1\t$hc.localdomain\t$hc" > /etc/hosts
@wongsyrone
wongsyrone / part1.sh
Created January 21, 2018 15:21 — forked from fgoinai/part1.sh
#!/bin/bash
#check network connection
con=$(ping -q -w 1 -c 1 `ip r | grep default | cut -d ' ' -f 3` > /dev/null && echo ok || echo error)
if [ $con == "error" ]; then
exit -1
fi
timedatectl set-ntp true
lsblk
@wongsyrone
wongsyrone / introrx.md
Created November 26, 2017 00:53 — forked from staltz/introrx.md
The introduction to Reactive Programming you've been missing
@wongsyrone
wongsyrone / gist:2ae6b641975b5685abbfd72edd9d483b
Last active October 2, 2018 13:03
visual studio 2017 offline installation
create initial layout, this write settings to --layout dir
D:\>vs_community.exe --layout D:\vs2017layout --lang en-US --add Microsoft.VisualStudio.Workload.NetWeb --add Microsoft.VisualStudio.Workload.ManagedDesktop --add Microsoft.VisualStudio.Workload.NativeDesktop --add Microsoft.VisualStudio.Component.CoreEditor --add Microsoft.VisualStudio.Component.NuGet --add Microsoft.VisualStudio.Component.VC.Tools.x86.x64 --add Microsoft.VisualStudio.Component.Windows10SDK.16299.Desktop --add Microsoft.VisualStudio.Component.Windows81SDK --add Microsoft.Component.VC.Runtime.UCRTSDK
after initial layout creation, just execute this to update layout
D:\>D:\vs2017layout\vs_community.exe --layout D:\vs2017layout
clean old layout, after this cmd, can delete the Archive dir
@wongsyrone
wongsyrone / how-to-install-latest-gcc-on-ubuntu-lts.txt
Created October 13, 2017 01:10 — forked from application2000/how-to-install-latest-gcc-on-ubuntu-lts.txt
How to install latest gcc on Ubuntu LTS (12.04, 14.04, 16.04)
These commands are based on a askubuntu answer http://askubuntu.com/a/581497
To install gcc-6 (gcc-6.1.1), I had to do more stuff as shown below.
USE THOSE COMMANDS AT YOUR OWN RISK. I SHALL NOT BE RESPONSIBLE FOR ANYTHING.
ABSOLUTELY NO WARRANTY.
If you are still reading let's carry on with the code.
sudo apt-get update && \
sudo apt-get install build-essential software-properties-common -y && \
sudo add-apt-repository ppa:ubuntu-toolchain-r/test -y && \
@wongsyrone
wongsyrone / LilLambda.ipynb
Created October 4, 2017 02:20 — forked from vakila/LilLambda.ipynb
Anjana Vakil, "Mary had a little lambda", EuroPython 2017: https://ep2017.europython.eu/conference/talks/mary-had-a-little-lambda
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@wongsyrone
wongsyrone / gist:76f10469c383d6b257c85afd8da6e7ee
Last active November 22, 2017 00:18
openwrt/lede mac80211(compat-wireless/backports)
example: ./gentree.py --refresh --git-revision v4.14-rc1 --clean /home/hauke/linux/linux-next-clean/ ../backports-4.14-rc1
mine:
# needed by gentree.py
apt-get install coccinelle
git clone https://git.kernel.org/pub/scm/linux/kernel/git/backports/backports.git
pushd backports
git checkout master