Skip to content

Instantly share code, notes, and snippets.

View WeZZard's full-sized avatar
😄
Coding maniac.

WeZZard WeZZard

😄
Coding maniac.
View GitHub Profile
@jbenet
jbenet / current_utc_time.c
Created July 17, 2011 16:17
work around lack of clock_gettime in os x
/*
author: jbenet
os x, compile with: gcc -o testo test.c
linux, compile with: gcc -o testo test.c -lrt
*/
#include <time.h>
#include <sys/time.h>
#include <stdio.h>
@n8gray
n8gray / configure-ios
Created January 19, 2012 18:51
A script to configure autotools software for iOS
#!/bin/bash
################################################################################
#
# Copyright (c) 2008-2009 Christopher J. Stawarz
#
# Modified by Nathaniel Gray in 2012 to support Clang, custom dev tool locations,
# and armv7. Also removed "make install" phase, since that can easily be done by
# hand.
#
@lotem
lotem / default.custom.yaml
Last active January 25, 2024 08:47
在Rime輸入方案選單中添加五筆、雙拼、粵拼、注音,保留你需要的
# default.custom.yaml
# save it to:
# ~/.config/ibus/rime (linux)
# ~/Library/Rime (macos)
# %APPDATA%\Rime (windows)
patch:
schema_list:
- schema: luna_pinyin # 朙月拼音
- schema: luna_pinyin_simp # 朙月拼音 简化字模式
@sekati
sekati / xcode-build-bump.sh
Created July 24, 2012 20:44
Xcode Auto-increment Build & Version Numbers
# xcode-build-bump.sh
# @desc Auto-increment the build number every time the project is run.
# @usage
# 1. Select: your Target in Xcode
# 2. Select: Build Phases Tab
# 3. Select: Add Build Phase -> Add Run Script
# 4. Paste code below in to new "Run Script" section
# 5. Drag the "Run Script" below "Link Binaries With Libraries"
# 6. Insure that your starting build number is set to a whole integer and not a float (e.g. 1, not 1.0)
@goblindegook
goblindegook / addObserver.m
Created December 2, 2012 21:18
Detect VoiceOver Status Changes
- (void)viewDidLoad {
...
[[NSNotificationCenter defaultCenter]
addObserver:self
selector:@selector(didChangeVoiceOverStatus:)
name:UIAccessibilityVoiceOverStatusChanged
object:nil];
...
}
@nogweii
nogweii / color_scheme.yaml
Last active February 20, 2023 17:54
The current color scheme I use in my gnome terminal, plus accompanying ruby script which generated it
---
:blue: "#3465A4"
:cyan: "#06989A"
:green: "#4E9A06"
:bright_red: "#EF2929"
:bright_yellow: "#FCE94F"
:bright_purple: "#AD7FA8"
:bright_white: "#EEEEEC"
:red: "#CC0000"
:yellow: "#C4A000"
@fabiofl
fabiofl / gist:5873100
Created June 27, 2013 00:41
Clear Mac OS X's icon cache.
sudo find /private/var/folders/ -name com.apple.dock.iconcache -exec rm {} \;
@linjunpop
linjunpop / README.md
Last active December 23, 2015 15:49
iOS 7 Safari Notes

CSS font values

-apple-system-headline1
-apple-system-headline2
-apple-system-body
-apple-system-subheadline1
-apple-system-subheadline2
-apple-system-footnote
-apple-system-caption1
@crmne
crmne / Convert Currency.scpt
Last active April 13, 2018 10:47
Converts currencies using Google Finance. Created specifically for LaunchBar, just put it in `~/Library/Application Support/LaunchBar/Actions`. It accepts input in this form: `<amount> <from currency> […] <to currency>`. So for example all of those strings will result in the same conversion: "60 gbp to eur" "60 gbp in eur" "60 gbp eur". It will …
on parse_input_string(theString)
set AppleScript's text item delimiters to " "
set theFromAmount to text item 1 of theString as text
if length of text items of theString is greater than 1 then
set theFromCurrency to text item 2 of theString as text
set theToCurrency to text item -1 of theString as text
set currenciesGiven to true
else
set theFromCurrency to "USD"
set theToCurrency to "EUR"
@soarez
soarez / ca.md
Last active July 19, 2024 04:05
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.