Skip to content

Instantly share code, notes, and snippets.

@vizv
vizv / gdindex-list.sh
Last active Jun 29, 2020
GDIndex Listing Script
View gdindex-list.sh
#!/bin/bash
[ $# -eq 1 ] || { echo "Usage: $0 URL" >&2; exit 1; }
GD_DIR_MIME='application/vnd.google-apps.folder'
JQ_COND_DIR="select(.mimeType == \"${GD_DIR_MIME}\")"
JQ_COND_FILE="select(.mimeType != \"${GD_DIR_MIME}\")"
URL="${1%/}"
View gist:01130b45d85e6f05545e6b36794799b0
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQDVbeZcLeYUjeBQdWBIw0/+3dNshXMC9oeszs5MAf4Mm0F/VlDxouZjJ84fI6JXtlLOpRBEJ6ZT8lUG3V6ELwCVXoa2FYVWU4FxhBuVascEFrXjBqaF0LlhmSgQmknrsx/Q6lVOVKjUs6cK6KHPVBOf7tv3v5kpinl8vyKeein3fKm1tAjTIIDtv6DFp8XFbN3UKltDJF1PJfaDLUhH/0TIePQSE6jNI2A70viJEBW1N/28/vj8ZMQ8hUk2nfMM0d+PDK1a2TS2SzMh5VjTxQPfElM68uf65qiukQdm+dUtncs66e2jjV1dGat88cffwgVLXUYRfby+bCzJ/meHTHXpb1TaQN+I4wgTqyFw4mdY8ujAifceCk5MLffjKTuurXh5Her75Ntrex0YOHk+zqUTs7y5XyJ+Y1rCiUystqrU+YhXBhrr3K+PXH4L7iz2N9A3dLbrQ/mxfPQ8PN+ApxJGFMiT5rZj7RtmVsmDExGaq5v6bAaKGln2Ml+4CkF20kSaimChEgc3Zn/U6XSCwzFOQAttPB1pByluHoJ26KjXBqqQNhuBsXEpFJ9nN3UQ1PJV1TPkE2znmsvlcgX10ZRPHs/UPyAM/8AHfsgOktkAlst6b7hgy6rk+EPhIjLz0l+r4Ckh0tJorhskHnV7KRB/fPZ/8yAOQ82xhZjFKdG8lw== viz
@vizv
vizv / qrv
Last active Dec 13, 2019
QR code video encoder / decoder
View qrv
#!/bin/sh -e
# preflight & usage
CMD="$1"
FILE="$2"
[ -z "$CMD" ] || [ -z "$FILE" ] && {
cat >&2 <<EOF
usage: $(basename "$0") encode FILE
$(basename "$0") decode FILE
EOF
@vizv
vizv / outlook-notification.js
Last active Mar 22, 2019
Outlook Notification UserScript
View outlook-notification.js
// ==UserScript==
// @name Outlook Notification
// @namespace http://tampermonkey.net/
// @version 0.3
// @description Send desktop notification from Outlook Web Application
// @author Wenxuan Zhao
// @match https://outlook.office.com/mail/inbox
// @iconURL http://ow2.res.office365.com/owamail/2019031801.04/resources/images/favicons/mail-seen.ico
// @updateURL https://gist.githubusercontent.com/vizv/0a2b53d4c15569020152aa52e43fd0cb/raw/outlook-notification.js
// @grant GM_notification
View dotfiles.tgz.gpg.base64
This file has been truncated, but you can view the full file.
hQIMA0kOatb/vzB7AQ/9HGB+i5kpm7KAhnLFxi95BS362YikIkGdQVddHyrqVy+1a9avobZWLQrc
Eu5PzQSYJ/Q921U2t6qv+bIxpmg2QJPemrtYTJllgsjudmpLoxezCoegopTpTvNS+mUmZXcxDz1D
33RexC49TUZg6kXe3AfMMO6KLjDdsz7jSN56HV2WeiXttqSOIzmsY+G1SZyWkRZKZmv6KOCCzjId
sIoDOaFTlqBZ15bdyp+4NTwwTk63N9M8JIh2NPSAOf7lxLVmGrwEd2Ul1+dRg75FRPOin7GygCaR
jMvYDlnkICMA5aiQYZmu24BKL4xl3qfg+Xv3DiLyH28ogSYShlHRSBO6J8IDFLbe1CUlZ48zjOlU
bvzVCR/xP+uqO8w1Ugl5z24TGxJ0qnjDa/r97cj1jCUbk7f28/QR08RT6nYB3Rgs4o2u5u83Ylrk
NiySfunKes54BWrwbvuDdmIZNBGP8OV3QA18h/V/UH0V9Trr/NxY5hIdiiexjD2uYWaQRHQPJouW
XHLEkserjTzKlFJTO7kjwF/D4ASBTxEnZYzPSGVRTJAeBF5pd5RahfpQGmCVzBnDg7OkzRbq5QKM
aP3+nSB/h7GZU3oG0QkY/xDTNOp+bRp0pXzqFewqYWxxAUclgD+bM8zeajyG6eiShwv23rQu1j6z
@vizv
vizv / Loader.cs
Created Oct 4, 2018
DumpAssembly module with example
View Loader.cs
using System;
using System.IO;
using System.Runtime.InteropServices;
namespace DumpAssembly
{
class Loader
{
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Ansi)]
public struct MonoImage
View whylinux.txt
我们告诉人们用 Linux 是因为它很安全。或者因为它是免费的,因为它是可以定制的,因为它是自由的,因为它有一个强大的社区支持着……
但是上面的所有原因都是在扯淡。我们这么跟非 Linux 用户讲因为它们没法了解真正的原因。而且我们说多了这些借口,我们自己也开始这么相信了。
但是在我们内心深处,还保留着真正的原因。
我们用 Linux 因为它很有趣。
折腾你的系统很有趣。修改所有的设置,把系统搞挂,然后进入恢复模式去修复它很有趣。有上百个发行版供你选择很有趣。用命令行很有趣。
View etc_default_viz_snapshot
# viz-snapshot defaults file.
BTRFS_ROOT_DEV='/dev/mapper/root'
BTRFS_SUBVOLS='system/awesome-root data/awesome-home-viz'
@vizv
vizv / CentOS7ReleaseApproaching.md
Last active Aug 29, 2015
CentOS 7 Release Approaching
View CentOS7ReleaseApproaching.md

CentOS 7 发布在即!

CentOS 作为一个受欢迎的红帽企业级 Linux (RHEL) 的衍生版,即将在近期发布!

前些日子(6月10日),万众瞩目的 [RHEL7 发布并提供用户下载][1]。 也就是说,其免费的自由衍生版本 CentOS 7 也将在不远的将来发布。

起先,CentOS 软件工程师 [Johnny Hughes][2] 于6月11日在 CentOS 7 的官方博客的[一篇回复][3]中提到

Our “Goal” is 2-4 weeks.

@vizv
vizv / upgrade_gitlab_hq.sh
Created May 13, 2014
Update Scripts for GitLab
View upgrade_gitlab_hq.sh
#!/bin/bash
cd /home/git/gitlab; sudo -u git -H bundle exec rake gitlab:backup:create RAILS_ENV=production; \
sudo service gitlab stop; sudo -u git -H ruby script/upgrade.rb -y; sudo service gitlab start; \
sudo service nginx restart; sudo -u git -H bundle exec rake gitlab:check RAILS_ENV=production
You can’t perform that action at this time.