Skip to content

Instantly share code, notes, and snippets.

View Superbil's full-sized avatar
:shipit:
Working in Cloud

Superbil Superbil

:shipit:
Working in Cloud
View GitHub Profile
@v1m
v1m / .curlrc
Last active January 30, 2025 09:32
sample .curlrc file
# this is a sample .curlrc file
# https://everything.curl.dev/ is a GREAT RESOURCE
# store the trace in curl_trace.txt file. beware that multiple executions of the curl command will overwrite this file
--trace curl_trace.txt
# store the header info in curl_headers.txt file. beware that multiple executions of the curl command will overwrite this file
--dump-header curl_headers.txt
#change the below referrer URL or comment it out entirely
@claybridges
claybridges / xcbuild-safe.sh
Last active September 26, 2018 18:21
Drop in replacement/wrapper for xcodebuild, fixes Xcode 7 build dependency on system ruby vs. rvm. Explained further @ http://stackoverflow.com/questions/33041109.
#!/bin/bash --login
# Cf. http://stackoverflow.com/questions/33041109
#
# Xcode 7 (incl. 7.0.1) seems to have a dependency on the system ruby.
# xcodebuild is screwed up by using rvm to map to another non-system
# ruby†. This script is a fix that allows you call xcodebuild in a
# "safe" rvm environment, but will not (AFAIK) affect the "external"
# rvm setting.
#
@nickfrey
nickfrey / WFSimulate3DTouchPreview.m
Created September 22, 2015 20:13
Test 3D Touch peek/pop using private APIs
@interface UIPreviewForceInteractionProgress : NSObject
- (void)endInteraction:(BOOL)arg1;
@end
@interface UIPreviewInteractionController : NSObject
@property (nonatomic, readonly) UIPreviewForceInteractionProgress *interactionProgressForPresentation;
@dfletcher
dfletcher / tsws
Last active July 21, 2018 12:47
Totally simple web server using Bash and netcat (nc)
Moved to a proprer repositoy, TSWS is a real boy now!
https://github.com/dfletcher/tsws
PRs welcomed.
@killdash9
killdash9 / vulture-nethack-mac-build.sh
Last active March 21, 2025 07:18
Build vulture nethack from source on Mac OSX. Place this file in the base of the vulture nethack source code and run it.
# Step 1: Install the following 3rd party prerequisites, you can get these from macports:
#
# sudo port install libpng
# sudo port install libsdl_ttf
# sudo port install libsdl_mixer
#
# Step 2: Download and unzip Vulture Nethack source from http://www.darkarts.co.za/vulture-for-nethack
#
# Step 3: Place this file at the base of the unzipped vulture nethack source directory, and run it:
# sh vulture-nethack-mac-build.sh
@letoh
letoh / org-emphasis-hack.el
Created July 21, 2015 18:14
some tweaks on org-emphasis syntax
;;; 只在 Org 8.2.10 測試過
;;; 應該可以放到 org-load-hook 之類的地方吧...
;; 允許中文全形標點緊接在 emphasis marker 前後 (i.e. pre-, post-match)
;; 例: ,*中文* 或 +測試+。
(setcar (nthcdr 0 org-emphasis-regexp-components) " \t('\"{、,。:;?「」『』〈〉《》>【】﹝﹞")
(setcar (nthcdr 1 org-emphasis-regexp-components) "- \t.,:!?;'\")}\\、,。:;?「」『』〈〉《》【】﹝﹞")
;; 允許 , ' " 這三個標點出現在緊臨 emmphasis marker 內側的位置
;; 例: ="= 或 =123"=
(setcar (nthcdr 2 org-emphasis-regexp-components) " \t\r\n")
@import Foundation;
@interface KKWatchAppNotificationCenter : NSObject
+ (instancetype)sharedCenter;
- (void)postNotification:(NSString *)key;
- (void)addTarget:(id)target selector:(SEL)selector name:(NSString *)notification;
- (void)removeObserver:(NSObject *)observer;
@end
@mariotaku
mariotaku / .travis.yml
Last active August 8, 2018 13:10
Sign and upload compiled apk to Github releases automatically using Travis CI
language: android
android:
components:
# Uncomment the lines below if you want to
# use the latest revision of Android SDK Tools
- platform-tools
- tools
# The BuildTools version used by your project
- build-tools-22.0.0
@Inndy
Inndy / log-cat.py
Last active August 29, 2015 14:15
A simple tool to parse and re-format apache / nginx access.log
#!/usr/bin/env python3
"""
log:
255.255.255.255 - - [20/Feb/2015:16:03:26 +0800] "POST /wp-login.php HTTP/1.1" 200 4081 "-" "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-GB; rv:1.8.1.14) Gecko/20110201 Firefox/2.0.0.14"
example:
log-cat.py "{0:32}{5:6}{8}" access.log
output:
255.255.255.255 200 Mozilla/5.0 (Windows; U; Windows NT 5.1; en-GB; rv:1.8.1.14) Gecko/20110201 Firefox/2.0.0.14
@ptrv
ptrv / lldb-gud-emacs-25.patch
Last active October 17, 2017 14:55
lldb-gud patch from llvm.org for emacs 25
diff --git a/lisp/progmodes/gud.el b/lisp/progmodes/gud.el
index 42c5b20..0f6f412 100644
--- a/lisp/progmodes/gud.el
+++ b/lisp/progmodes/gud.el
@@ -35,7 +35,7 @@
;; kluge with the gud-xdb-directories hack producing gud-dbx-directories.
;; Derek L. Davies <[email protected]> added support for jdb (Java
;; debugger.) Jan Nieuwenhuizen added support for the Guile REPL (Guile
-;; debugger).
+;; debugger). llvm.org added support for lldb.