Skip to content

Instantly share code, notes, and snippets.

@0xced
0xced / UIDevice+serialNumber.h
Last active February 7, 2024 06:14
UIDevice+serialNumber
/*
* Adds the serialNumber property to the UIDevice class
*
* The implementation uses undocumented (for iOS) IOKit functions,
* so handle with caution and be prepared for nil.
*/
#import <UIKit/UIDevice.h>
@interface UIDevice (serialNumber)
@tsabat
tsabat / zsh.md
Last active December 25, 2023 19:16
Getting oh-my-zsh to work in Ubuntu
<!doctype html>
<!-- http://taylor.fausak.me/2015/01/27/ios-8-web-apps/ -->
<html>
<head>
<title>iOS 8 web app</title>
<!-- CONFIGURATION -->
@adamawolf
adamawolf / Apple_mobile_device_types.txt
Last active April 23, 2024 02:53
List of Apple's mobile device codes types a.k.a. machine ids (e.g. `iPhone1,1`, `Watch1,1`, etc.) and their matching product names
i386 : iPhone Simulator
x86_64 : iPhone Simulator
arm64 : iPhone Simulator
iPhone1,1 : iPhone
iPhone1,2 : iPhone 3G
iPhone2,1 : iPhone 3GS
iPhone3,1 : iPhone 4
iPhone3,2 : iPhone 4 GSM Rev A
iPhone3,3 : iPhone 4 CDMA
iPhone4,1 : iPhone 4S
@cloudsben
cloudsben / oauth2_lib.php
Created October 17, 2012 07:18
codeigniter新浪微博 SDK
<?php if (!defined('BASEPATH')) exit('No direct script access allowed');
/**
* @ignore
*/
class OAuthException extends Exception {
// pass
}
class Oauth2_lib {
@jiguang
jiguang / random_color.html
Last active December 25, 2015 06:19
随机颜色,可控制深浅
<!doctype html>
<html>
<head>
<meta charset="UTF-8">
<style type="text/css">
h1{font: bold 14px/1.5em \5FAE\8F6F\96C5\9ED1; color: #333;}
button{cursor: pointer;}
#opt{ margin-bottom: 15px;}
#opt label, #opt input{font: 12px/20px arial;}
#opt input{width: 40px; padding: 0 2px;}
@zaherg
zaherg / install.md
Last active October 18, 2020 17:45
a small tips to install latest nginx , php 5.5 & laravel 4.1 since that Laravel 4.1 has been released, i have removed the line which explain how to install laravel from dev branch using composer.

Creating Your Laravel & nginx Server

We will install Larave 4.1 with PHP5.5 & Latest nginx on Ubuntu 12.04.3 x64.

updating your system

apt-get update && apt-get upgrade
adduser [username]
usermod -aG sudo [username]
apt-get -y install git
@guweigang
guweigang / git_toturial
Last active April 23, 2024 02:55
git命令大全
git init # 初始化本地git仓库(创建新仓库)
git config --global user.name "xxx" # 配置用户名
git config --global user.email "xxx@xxx.com" # 配置邮件
git config --global color.ui true # git status等命令自动着色
git config --global color.status auto
git config --global color.diff auto
git config --global color.branch auto
git config --global color.interactive auto
git config --global --unset http.proxy # remove proxy configuration on git
git clone git+ssh://git@192.168.53.168/VT.git # clone远程仓库
@andreacremaschi
andreacremaschi / UITableView+Header
Last active June 28, 2020 04:19
UITableView category to resize table view header using autolayout
UITableView convenience classes for resizing header and footer with autolayout.
#!/bin/bash
# unzip the .ipa file
unzip -q "$1"
# Default information
displayName=`/usr/libexec/PlistBuddy -c "Print CFBundleDisplayName" Payload/*/Info.plist`
bundleIdentifer=`/usr/libexec/PlistBuddy -c "Print CFBundleIdentifier" Payload/*/Info.plist`
versionName=`/usr/libexec/PlistBuddy -c "Print CFBundleShortVersionString" Payload/*/Info.plist`