Skip to content

Instantly share code, notes, and snippets.

@insin
insin / bash_prompt.sh
Created December 3, 2011 01:49 — forked from woods/git_svn_bash_prompt.sh
Set color bash prompt according to active virtualenv, git branch and return status of last command.
#!/bin/bash
#
# DESCRIPTION:
#
# Set the bash prompt according to:
# * the active virtualenv
# * the branch/status of the current git repository
# * the return value of the previous command
# * the fact you just came from Windows and are used to having newlines in
# your prompts.
@nicerobot
nicerobot / README.md
Last active February 25, 2024 02:41
Mac OS X uninstall script for packaged install of node.js from https://stackoverflow.com/a/9287292/23056

To run this, you can try:

curl -ksO https://gist.githubusercontent.com/nicerobot/2697848/raw/uninstall-node.sh
chmod +x ./uninstall-node.sh
./uninstall-node.sh
rm uninstall-node.sh
@nschneid
nschneid / zotselect-link.js
Last active January 15, 2024 02:56
Zotero export translator that generates a zotero://select link to an item in the Zotero library. (First a simple version, as well as a version that displays minimal citation information and stores further details as title text.)
@textarcana
textarcana / centos-install-syntax-highlighting-in-less.sh
Last active May 1, 2023 01:01
2020 update: just use bat(1) instead!!!! bat has git integration and also can show invisible characters! OLD STUFF: How to enable syntax-highlighting in less. Use `less -N` (or type -N while in less) to enable line numbers. Based on the procedure described in http://superuser.com/questions/71588
# Enable syntax-highlighting in less.
# Last tested on CentOS 6.3.
#
# First, add these two lines to ~/.bashrc
# export LESSOPEN="| /usr/bin/src-hilite-lesspipe.sh %s"
# export LESS=" -R "
sudo yum -y install boost boost-devel ctags
wget http://springdale.math.ias.edu/data/puias/unsupported/6/x86_64/source-highlight-3.1.6-3.puias6.x86_64.rpm

参考了以下两篇文献: http://blog.ch3n2k.com/2013/09/openwrt.html http://www.right.com.cn/forum/thread-128967-1-1.html

tomato路由器上已经成功部署,并且一直很稳定,openwrt的部署步骤是我按照上面的两篇文献以及tomato上的部署经验写的,但我没有真正搭建过。下面是详细的解决方案:

#一、tomato路由器 1、设置好jffs和ipkg安装环境;把附件中的geoip压缩包的内容放入/opt/etc/geoip(或者/jffs/opt/etc/geoip)目录下。

2、在系统管理——脚本设置——wan连线中输入以下内容:

diff -rupN xcrysden-1.5.60/F/gengeom.f myxcrysden-1.5.60/F/gengeom.f
--- xcrysden-1.5.60/F/gengeom.f 2012-02-03 18:53:05.000000000 +0800
+++ myxcrysden-1.5.60/F/gengeom.f 2018-08-03 14:41:35.000000000 +0800
@@ -905,7 +905,7 @@ C DETERMINE HOW MENY ATOMS WILL BE I
SUBROUTINE GETCCOOR(A33,B33,BROW,X,Y,Z,XC,YC,ZC,NA,NATR)
include 'param.inc'
- REAL*8 B33(3,4),A33(3,3),RA(3,3),COOR(3),X(NATR),Y(NATR),Z(NATR),
+ REAL*8 B33(3,*),A33(3,3),RA(3,3),COOR(3),X(NATR),Y(NATR),Z(NATR),
* XC(NAC,4),YC(NAC,4),ZC(NAC,4),RX(3)

跨区安装锁区play应用

需要的东西

  1. 出口节点为锁区国家的隧道
  2. [APK Downloader][]
  3. google帐号
  4. 一台可以正常使用GMS的Android设备

操作步骤

  1. 在设备上登入google帐号
@cvan
cvan / set-up-chromium-keys.md
Last active March 19, 2024 10:44
Launch Chromium with API Keys on Mac OS X and Windows

Last Updated: March 2023

IMPORTANT: Ignore the out-of-date steps below for getting Chromium keys.

Instead, read this up-to-date guide (Jan 2023) written by @LearningToPi.

P.S. Thank you to every contributor below who provided tips over the years on what should be a straightforward process: setting up Chromium for local development.

Long live the web!

@romanlevin
romanlevin / bash_prompt.sh
Last active May 25, 2022 02:35 — forked from insin/bash_prompt.sh
Set color bash prompt according to active pyenv, git branch and return status of last command.
#!/bin/bash
#
# DESCRIPTION:
#
# Set the bash prompt according to:
# * the active virtualenv
# * the branch/status of the current git repository
# * the return value of the previous command
# * the fact you just came from Windows and are used to having newlines in
# your prompts.
@Explorare
Explorare / com.google.Chrome.mobileconfig
Last active November 28, 2022 05:54
Add local chrome extensions to whitelist in MacOS. https://hencolle.com/2016/10/16/baidu_exporter/
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>PayloadContent</key>
<array>
<dict>
<key>PayloadContent</key>
<dict>
<key>com.google.Chrome</key>