Skip to content

Instantly share code, notes, and snippets.

View oxUnd's full-sized avatar
🔑
多写代码少说话

秋_ oxUnd

🔑
多写代码少说话
  • Harbin Institute of Technology
  • China
View GitHub Profile
@steve-jansen
steve-jansen / README.md
Last active December 13, 2024 23:29
Stop and start Symantec Endpoint Protection on OS X

This script enables you stop and start Symantec Endpoint Protection on OS X

Installation

sudo curl https://gist.githubusercontent.com/steve-jansen/61a189b6ab961a517f68/raw/sep -o /usr/local/bin/sep
sudo chmod 755 /usr/local/bin/sep
sudo chown root:staff /usr/local/bin/sep
@kelvinn
kelvinn / cmd.sh
Created July 24, 2014 02:55
Example of using Apache Bench (ab) to POST JSON to an API
# post_loc.txt contains the json you want to post
# -p means to POST it
# -H adds an Auth header (could be Basic or Token)
# -T sets the Content-Type
# -c is concurrent clients
# -n is the number of requests to run in the test
ab -p post_loc.txt -T application/json -H 'Authorization: Token abcd1234' -c 10 -n 2000 http://example.com/api/v1/locations/
@firedfox
firedfox / browser.txt
Created July 7, 2014 06:41
browser & os map
#智能手机浏览器
70 UCBrowser/9.2
70 UCWEB9.2
71 UCBrowser/9.3
71 UCWEB9.3
72 UCBrowser/9.4
72 UCWEB9.4
73 UCBrowser/9.5
73 UCWEB9.5
74 UCBrowser/9.6
@jtauber
jtauber / gist:8b2fa862d43ecedf7536
Last active January 20, 2023 19:40
setting up OS X 10.9 for i386-elf cross-compilation
# frustratingly, we need to have "real" gcc to build the i386-elf binutils/gcc
brew install gcc
# $PROJECT_HOME should be the parent directory under which you'll download
# everything and build the toolchain
cd $PROJECT_HOME
mkdir toolchain
@commadelimited
commadelimited / _readme.md
Last active December 16, 2015 03:40
Node.js dns.resolve "bug"?

I'm pulling company data from a file server, simon.int (dataDomain). While connected to our network via ethernet cable, or our internal wireless network I can access the file server via both browser, and via Node.js dns.resolve. If I'm outside our network I can't connect via either browser or Node's dns.resolve method (as expected). The problem arises when I connect to our internal network via VPN. I can open simon.int in a browser, I can ping it, etc. yet dns.resolve returns an error when trying to connect to it.

I feel that this is a bug, but I can't find documentation of any sort of expectation of how it should work. I'm trying to determine whether I should report it as a bug, or if my expectation of it is incorrect. I ended up getting around it by making a jQuery AJAX HEAD request just to see if the server was available or not (works great).

I'd love input on this subject, or a pointer in the right direction.

A fellow developer suggested that perhaps it amounted to the user that Node was

@balupton
balupton / README.md
Last active June 29, 2023 07:04
Installing ChromiumOS

Install ChromiumOS

  1. Get Chromium OS from one of the following places
    1. Download the vanilla build (old but stable): http://chromeos.hexxeh.net/
      1. NOTE: Password is facepunch
    2. Download the nightly build (sync doesn't work): http://download-chromiumos.appspot.com/
      1. NOTE: If you want developer mode, you must change _base_ in the download URL to _test_ as the base image does not have developer tools enabled
      2. NOTE: Password is unknown, instructions for working around this are provided later
      3. NOTE: I could not get syncing working with this build, perhaps due to no API KEYS being provided???
  2. NOTE: I could not move past the welcome screen on the 64bit build due to no network being found (32bit worked)
@jwreagor
jwreagor / EmacsKeyBinding.dict
Created March 20, 2014 18:41
Global Emacs Key Bindings for OS X
{
/* Keybindings for emacs emulation. Compiled by Jacob Rus.
*
* This is a pretty good set, especially considering that many emacs bindings
* such as C-o, C-a, C-e, C-k, C-y, C-v, C-f, C-b, C-p, C-n, C-t, and
* perhaps a few more, are already built into the system.
*
* BEWARE:
* This file uses the Option key as a meta key. This has the side-effect
* of overriding Mac OS keybindings for the option key, which generally
@sbeckeriv
sbeckeriv / .neovimrc
Created February 23, 2014 04:12
neovim vunder
set nocompatible
set runtimepath=~/.neovim/
filetype off
set rtp+=~/.neovim/bundle/vundle/
call vundle#rc('~/.neovim/bundle')
Bundle 'gmarik/vundle'
Bundle 'L9'
Bundle 'FuzzyFinder'
Bundle 'tpope/vim-fugitive'
@wojons
wojons / gist:6154645
Created August 5, 2013 09:35
nginx dont retry next upstream on post or put when timeout error
upstream mash {
ip_hash;
server 127.0.0.1:8081;
server 192.168.0.11:8081;
}
server {
location / {
if ($request_method = POST ) {
@scturtle
scturtle / addlrc.py
Last active March 4, 2023 10:10
download from music.163.com
import eyed3
import re
import glob
def get_lyric(lrc):
text = open(lrc).read()
text = re.sub(r'(?:\[.*\])+', '', text).strip()
text = map(lambda l: l.strip(), text.split('\n'))
ans = []
for l in text: