This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Ack --type=cpp 'pattern' --ignore-dir=dir path list | |
Qargs | |
silent! argdo :%s/(aa)bb(cc)/\1dd\2/ge | argdo update |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1.use the root user and passwd to login the remote server | |
2.ssh-keygen -t rsa | |
3.scp [-p port] ~/.ssh/id_rsa.pub yourremoteserver:/tmp | |
4.switch to the server | |
5.touch ~/.ssh/authorized_keys | |
6.cat /tmp/id_rsa.pub >> ~/.ssh/authorized_keys | |
7.reload ssh | |
8.quit your server and run ssh [-p port] user@remoteserver |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@echo off | |
setlocal EnableDelayedExpansion | |
for /F "tokens=1,2 delims=#" %%a in ('"prompt #$H#$E# & echo on & for %%b in (1) do rem"') do ( | |
set "DEL=%%a" | |
) | |
rem Prepare a file "X" with only one dot | |
<nul > X set /p ".=." | |
::call :color 1a "a" 1a is green |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
pip install flake8 | |
报错: | |
SSLError: The read operation timed out | |
解决方案: | |
https://github.com/pypa/pip/issues/829 | |
http://stackoverflow.com/questions/9847470/pip-search-django-produces-time-out-error |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
http://hub.github.com/ | |
# while on a topic branch called "feature": | |
$ git pull-request | |
[ opens text editor to edit title & body for the request ] | |
[ opened pull request on GitHub for "YOUR_USER:feature" ] | |
# explicit title, pull base & head: | |
$ git pull-request -m "Implemented feature X" -b defunkt:master -h mislav:feature |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- Two dashes start a one-line comment. | |
--[[ | |
Adding two ['s and ]'s makes it a | |
multi-line comment. | |
--]] | |
---------------------------------------------------- | |
-- 1. Variables and flow control. | |
---------------------------------------------------- |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# See original post at http://stackoverflow.com/questions/822404/how-to-set-up-cmake-to-build-an-app-for-the-iphone | |
cmake_minimum_required(VERSION 2.8) | |
cmake_policy(SET CMP0015 NEW) | |
cmake_policy(SET CMP0016 NEW) | |
project(test) | |
set(NAME test) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# | |
# Build and iPhone Simulator Helper Script | |
# Shazron Abdullah 2011 | |
# | |
# WARN: - if your .xcodeproj name is not the same as your .app name, | |
# this won't work without modifications | |
# - you must run this script in where your .xcodeproj file is | |
PROJECTNAME=$1 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import xlwt | |
import random | |
import numpy | |
import json | |
import statistics | |
ezxf = xlwt.easyxf | |
sampleCount = 10 | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
## this script is supposed to be run one directory below the original configure script | |
## usually in build-ios | |
MIN_IOS_VERSION=4.3 | |
IOS_SDK=7.1 | |
LIPO="xcrun -sdk iphoneos lipo" | |
STRIP="xcrun -sdk iphoneos strip" |