Skip to content

Instantly share code, notes, and snippets.

@zhaozg
zhaozg / README.md
Last active September 30, 2017 02:15 — forked from hofmannsven/README.md
My simply Git Cheatsheet
@winster
winster / build_libcurl_ios.sh
Created February 1, 2017 11:53
Build libcurl library for all iOS architectures
#!/bin/bash
export DEVROOT=/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain
DFT_DIST_DIR=${HOME}/Desktop/libcurl-ios-dist
DIST_DIR=${DIST_DIR:-$DFT_DIST_DIR}
function check_curl_ver() {
echo "#include \"include/curl/curlver.h\"
#if LIBCURL_VERSION_MAJOR < 7 || LIBCURL_VERSION_MINOR < 40
#error Required curl 7.40.0+; See http://curl.haxx.se/docs/adv_20150108A.html
@bitjockey42
bitjockey42 / 00_OSX_Docker_Machine_Setup.md
Last active November 9, 2020 13:49 — forked from andystanton/Start up local Docker Machine on OSX automatically.md
Use native virtualization on OS X docker with xhyve

What this?

So one of the painful points of using docker on OS X is that you need to run a virtualbox VM, which often suffers from performance issues. With xhyve, a OS X virtualization system, and docker-machine-xhyve you can now have docker use the native OS X hypervisor to run containers.

No more dealing with virtualbox shenanigans!

In this script, I've also set up a way to autoconfigure terminal sessions to load docker's environment vars (dependent on docker-machine) so you do not have to run eval $(docker-machine env whatever) every time you open a new terminal window.

Requirements

@rindeal
rindeal / uncrustify-c-cpp.cfg
Last active May 20, 2022 05:11
Uncrustify C/C++ config
# -------------------------------------------------------------------------------------------------#
# #
# _ _ _ _ __ ___ _____ _ _ __ _ #
# | | | |_ _ __ _ _ _ _ __| |_(_)/ _|_ _ / __| / / __|| |_ _| |_ __ ___ _ _ / _(_)__ _ #
# | |_| | ' \/ _| '_| || (_-< _| | _| || | | (__ / / (_|_ _|_ _| / _/ _ \ ' \| _| / _` | #
# \___/|_||_\__|_| \_,_/__/\__|_|_| \_, | \___/_/ \___||_| |_| \__\___/_||_|_| |_\__, | #
# |__/ |___/ #
# #
# -------------------------------------------------------------------------------------------------#
# #
@evands
evands / combine_static_libraries.sh
Created January 14, 2015 20:40
Combine multiple .a static libraries, which may each have multiple architectures, into a single static library
#!/bin/sh
# Combined all static libaries in the current directory into a single static library
# It is hardcoded to use the i386, armv7, and armv7s architectures; this can easily be changed via the 'archs' variable at the top
# The script takes a single argument, which is the name of the final, combined library to be created.
#
# For example:
# => combine_static_libraries.sh combined-library
#
# Script by Evan Schoenberg, Regular Rate and Rhythm Software
@kwk
kwk / Makefile
Last active March 17, 2024 22:54
Compiling with Address Sanitizer (ASAN) with CLANG and with GCC-4.8
.PHONY: using-gcc using-gcc-static using-clang
using-gcc:
g++-4.8 -o main-gcc -lasan -O -g -fsanitize=address -fno-omit-frame-pointer main.cpp && \
ASAN_OPTIONS=symbolize=1 ASAN_SYMBOLIZER_PATH=$(shell which llvm-symbolizer) ./main-gcc
using-gcc-static:
g++-4.8 -o main-gcc-static -static-libstdc++ -static-libasan -O -g -fsanitize=address -fno-omit-frame-pointer main.cpp && \
ASAN_OPTIONS=symbolize=1 ASAN_SYMBOLIZER_PATH=$(shell which llvm-symbolizer) ./main-gcc-static
@vertexclique
vertexclique / cracking.md
Last active May 11, 2024 21:17
Cracking guide for Sublime Text 3 Build 3059 / 3065 ( Mac / Win x86_64 / Windows x86 / Linux x64 / Linux x86 )

MacOS

Build 3059

MD5: 59bab8f71f8c096cd3f72cd73851515d

Rename it to: Sublime Text

Make it executable with: chmod u+x Sublime\ Text

@soarez
soarez / ca.md
Last active July 15, 2024 09:31
How to setup your own CA with OpenSSL

How to setup your own CA with OpenSSL

For educational reasons I've decided to create my own CA. Here is what I learned.

First things first

Lets get some context first.

@rgieseke
rgieseke / html.lua
Last active January 1, 2016 05:38
HTML lexer changes
-- Copyright 2006-2013 Mitchell mitchell.att.foicica.com. See LICENSE.
-- HTML LPeg lexer.
local l = lexer
local token, word_match = l.token, l.word_match
local P, R, S, V = lpeg.P, lpeg.R, lpeg.S, lpeg.V
local M = {_NAME = 'html'}
case_insensitive_tags = true
@gourneau
gourneau / email.scpt
Created July 8, 2013 05:29
AppleScript script to compose email using Microsoft Outlook
tell (current date) to get (it's month as integer) & "-" & day & "-" & (it's year as integer)
set MyDay to the result as text
set Mytitle to "Daily Email - " as text
set Mytitle to Mytitle & MyDay
tell application "Microsoft Outlook"
set newMessage to make new outgoing message with properties {subject:Mytitle}
make new recipient at newMessage with properties {email address:{name:"Name", address:"test@example.com"}}
#make new cc recipient at newMessage with properties {email address:{name:"Name", address:"test@example.com"}}