Skip to content

Instantly share code, notes, and snippets.

Allen.YL allenyllee

Block or report user

Report or block allenyllee

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View add_cron_jobs.sh
#!/bin/bash
# automatically repair filesystems with inconsistencies during boot
#sudo cp rcS /etc/default/
# automatically repair filesystems with inconsistencies during boot
# linux - What should I do to force the root filesystem check (and optionally a fix) at boot? - Unix & Linux Stack Exchange
# https://unix.stackexchange.com/questions/400851/what-should-i-do-to-force-the-root-filesystem-check-and-optionally-a-fix-at-bo/400927#400927
sudo sed -i 's|GRUB_CMDLINE_LINUX=.*|GRUB_CMDLINE_LINUX="fsck.repair=yes"|' /etc/default/grub
sudo update-grub
View list_dns.sh
#!/bin/bash
# Command-line to list DNS servers used by my system - Ask Ubuntu
# https://askubuntu.com/questions/152593/command-line-to-list-dns-servers-used-by-my-system
DEVICE_NAME="eno1"
# get interface name
interface=$(nmcli device | grep "$DEVICE_NAME" | cut -d' ' -f1)
@allenyllee
allenyllee / install_tools.sh
Last active Aug 20, 2019
mount vhdx in linux
View install_tools.sh
#!/bin/bash
# install qemu utils
sudo apt install qemu-utils
# install nbd client
sudo apt install nbd-client
@allenyllee
allenyllee / dynupdate.sh
Last active Sep 2, 2018 — forked from kylegibson/dynupdate.sh
Simple bash script to update a dyndns host entry
View dynupdate.sh
#!/bin/bash
HOST=foo.example.com
USER=
PASS=
IPADDR=$(curl -s https://api.ipify.org)
RESULT=$(wget -q -O- "https://$USER:$PASS@members.dyndns.org/nic/update?hostname=$HOST&myip=$IPADDR&wildcard=NOCHG&mx=NOCHG&backmx=NOCHG")
@allenyllee
allenyllee / arxiv-pdf-to-abstract-url-bookmarklet.js
Last active May 29, 2018
If you open an pdf url of arxiv paper, then wants to jump to its abstract page, using this javascript as bookmarklet. https://bookmarkify.it/9634
View arxiv-pdf-to-abstract-url-bookmarklet.js
javascript:(function()%7Bvar%20str%20%3D%20location.href%3Bstr%20%3D%20str.replace(%2F%5C.pdf%2Fg%2C%20%22%22)%3Bstr%20%3D%20str.replace(%2Fpdf%2Fg%2C%20%22abs%22)%3Blocation.href%20%3D%20str%7D)()
@allenyllee
allenyllee / uuid.sh
Created Jan 12, 2018 — forked from markusfisch/uuid.sh
Generate a random UUID in bash
View uuid.sh
#!/usr/bin/env bash
# Generate a pseudo UUID
uuid()
{
local N B C='89ab'
for (( N=0; N < 16; ++N ))
do
B=$(( $RANDOM%256 ))
@allenyllee
allenyllee / Convolutional Arithmetic.ipynb
Created Dec 21, 2017 — forked from akiross/Convolutional Arithmetic.ipynb
Few experiments on how convolution and transposed convolution (deconvolution) should work in tensorflow.
View Convolutional Arithmetic.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@allenyllee
allenyllee / Timer.bat
Created Dec 3, 2017
Timer for windows
View Timer.bat
@echo off
::echo Waiting For 2.5 Hour...
TIMEOUT /T 9000 /NOBREAK
shutdown /h
::echo.
::echo (Put some Other Processes Here)
::echo.
::pause >nul
@allenyllee
allenyllee / fetch_gdrive_file.sh
Last active Nov 10, 2017 — forked from ppetraki/fetch_gdrive_file.sh
allows you do non-interactively download large public files from gdrive
View fetch_gdrive_file.sh
#!/bin/bash
SOURCE="$1"
if [ "${SOURCE}" == "" ]; then
echo "Must specify a source url"
exit 1
fi
DEST="$2"
#if [ "${DEST}" == "" ]; then
View reverse_sshfs.sh
#!/bin/bash
##/*
## * @Author: AllenYL
## * @Date: 2017-11-08 11:37:31
## * @Last Modified by: allen7575@gmail.com
## * @Last Modified time: 2017-11-08 11:37:31
## */
#
You can’t perform that action at this time.