Skip to content

Instantly share code, notes, and snippets.

View albertofwb's full-sized avatar

Albert Wang albertofwb

View GitHub Profile
@hydrz
hydrz / git-lfs-install.sh
Last active February 9, 2020 04:10
deepin安装git-lfs
#!/bin/bash
curl -o /etc/apt/sources.list.d/git-lfs.list "https://packagecloud.io/install/repositories/github/git-lfs/config_file.list?os=debian&dist=stretch&source=script"
curl -L "https://packagecloud.io/github/git-lfs/gpgkey" 2> /dev/null | apt-key add -
apt update && apt install git-lfs
@JagoWang
JagoWang / gist:4509553
Last active December 29, 2020 03:01
Mac port使用
Mac Port 基本用法总结
1. Mac Port的下载地址
http://www.macports.org/install.php
2. Mac Port的说明文档
http://guide.macports.org/
3. Mac Port中第三方软件下载包存放的默认路径是:/opt/local/var/macports/distfiles/
为了提高安装速度,可以在安装新port时直接将此目录下的文件拷贝到新的Mac Port相同的目录中就可以避免Port去网上下载。
@olange
olange / graphviz-build-system-for-sublime.md
Created January 4, 2015 00:21
Graphviz (DOT) Build System for Sublime Text 2 and 3

To transform the currently opened Graphviz source file (in DOT Language) into a PNG:

{
    "cmd": [ "dot", "-Tpng", "-o", "$file_base_name.png", "$file"],
    "selector": "source.dot"
}

Usage

@kylelk
kylelk / popcount.c
Created October 16, 2015 02:12
sqlite extension to calculate population bit count
/* compile osx
* gcc -bundle -fPIC -O3 -o popcount.dylib popcount.c
* */
#include <stdio.h>
#include <stdlib.h>
#include <stdint.h>
#include <sqlite3ext.h>
SQLITE_EXTENSION_INIT1
@noahlias
noahlias / olefile_test.py
Created June 5, 2023 16:34
OLE file research.
import click
import olefile
import os
import imghdr
import struct
import filetype
@click.command()
@click.argument("file_name", type=click.Path(exists=True))
@guyskk
guyskk / shadowsocks-server.service
Last active January 30, 2024 05:18
shadowsocks server systemd service
[Unit]
Description=Shadowsocks Server
After=network.target
[Service]
ExecStart=/usr/local/bin/ssserver -c /etc/shadowsocks/ss-config.json
Restart=on-abort
[Install]
WantedBy=multi-user.target
@jherax
jherax / git-ssh-auth-win-setup.md
Last active February 12, 2024 19:37 — forked from bsara/git-ssh-auth-win-setup.md
Setup SSH Authentication for Git Bash on Windows

Setup SSH Authentication for Git Bash on Windows

Prepararation

  1. Create a folder at the root of your user home folder (Example: C:/Users/username/) called .ssh.
    You can run something like: mkdir -p ~/.ssh
  2. Create the following files if they do not already exist (paths begin from the root of your user home folder):
@UniIsland
UniIsland / SimpleHTTPServerWithUpload.py
Created August 14, 2012 04:01
Simple Python Http Server with Upload
#!/usr/bin/env python
"""Simple HTTP Server With Upload.
This module builds on BaseHTTPServer by implementing the standard GET
and HEAD requests in a fairly straightforward manner.
"""
@ryerh
ryerh / tmux-cheatsheet.markdown
Last active April 18, 2024 18:06 — forked from MohamedAlaa/tmux-cheatsheet.markdown
Tmux 快捷键 & 速查表 & 简明教程

注意:本文内容适用于 Tmux 2.3 及以上的版本,但是绝大部分的特性低版本也都适用,鼠标支持、VI 模式、插件管理在低版本可能会与本文不兼容。

Tmux 快捷键 & 速查表 & 简明教程

启动新会话:

tmux [new -s 会话名 -n 窗口名]

恢复会话:

@ntamvl
ntamvl / getting_a_readable_text_in_iterm2_how_do_i_color.md
Last active April 20, 2024 18:43
iTerm2 - color 'ls' and other outputs for MacOS

iTerm2 - color 'ls' and other outputs for MacOS

That's right. For OS X and BSD's ls, the flag is -G. Many people customize the behavior of ls by replacing it with an alias that adds extra options. I have the following in my .bashrc, for example:

alias ls='LSCOLORS=gxfxcxdxbxexexabagacad /bin/ls -bFHGLOPW'

Besides enabling colors in general, this sets the LSCOLORS variable in order to change which ones ls uses.