Skip to content

Instantly share code, notes, and snippets.

View summic's full-sized avatar
🏠
Working from home

Allen summic

🏠
Working from home
View GitHub Profile
@summic
summic / feature-configs.json
Created September 24, 2021 10:03
/feature-configs
{
"legalhold": {
"status": "disabled"
},
"sso": {
"status": "disabled"
},
"validateSAMLemails": {
"status": "disabled"
},

Keybase proof

I hereby claim:

  • I am summic on github.
  • I am a113n (https://keybase.io/a113n) on keybase.
  • I have a public key ASCY71ahFqZvL3q7_uoDKbyPsKFhV2ZLtaAS5mXvC_YEPAo

To claim this, I am signing this object:

[General]
loglevel = warning
bypass-system = true
skip-proxy = 192.168.0.0/16, 10.0.0.0/8, 172.0.0.0/8, localhost, *.local, e.crashlytics.com
bypass-tun = 192.168.0.0/16, 10.0.0.0/8, 172.0.0.0/8
dns-server = 119.29.29.29, 223.5.5.5, 114.114.114.114
ipv6 = false
allow-wifi-access = false
show-error-page-for-reject = true
hide-crashlytics-request = true
@summic
summic / post-receive.sh
Created January 2, 2013 11:26
post-receive
#!/bin/sh
#
cd "/var/www/domain.com/" || exit
unset GIT_DIR
echo "git status info:"
git status
echo "*************************************";
@summic
summic / reopen.m
Created November 21, 2012 03:21
小技巧:如何恢复显示关闭的窗口
在Mac OS中,点击窗口左上方的x,窗口将会关闭。如果你希望通过点击dock上的图标将窗口重新打开,你可以用如下方法做。
实现方法如下:
在delegate里设置一个outlet,比如myWindow:
IBOutlet NSWindow *myWindow;
@summic
summic / hardwareModel.m
Created November 21, 2012 03:14
获取硬件信息
#import <sys/sysctl.h>
+ (NSString *)hardwareModel
{
static NSString *hardwareModel = nil;
if (!hardwareModel) {
char buffer[128];
size_t length = sizeof(buffer);
if (sysctlbyname("hw.model", &buffer, &length, NULL, 0) == 0) {
hardwareModel = [[NSString allocWithZone:NULL] initWithCString:buffer encoding:NSASCIIStringEncoding];
@summic
summic / nswindow.m
Created November 18, 2012 15:31
Create Borderless Transparent Window:
- (id) initWithContentRect: (NSRect) contentRect
styleMask: (unsigned int) aStyle
backing: (NSBackingStoreType) bufferingType
defer: (BOOL) flag
{
if (![super initWithContentRect: contentRect
styleMask: NSBorderlessWindowMask
backing: bufferingType
defer: flag]){
return nil;
@summic
summic / code-stats.sh
Created October 25, 2012 06:26
Show code statistics for your project.
#!/bin/bash
# code-stats.sh
# Show code statistics for your project.
# Script version.
VERSION='0.1.3'
# Debug off by default.
DEBUG=
@summic
summic / dabblet.css
Created October 10, 2012 09:58
Untitled
* {
margin: 0;
padding: 0;
position: relative;
box-sizing: border-box;
}
img {
display: block;
}
@summic
summic / gist:1979270
Created March 5, 2012 16:58 — forked from dcai/configure-cli.sh
confgiure of php 5.4 for OS X 10.7 Lion
'./configure' '--prefix=/usr' '--mandir=/usr/share/man' '--infodir=/usr/share/info' '--sysconfdir=/private/etc' '--with-apxs2=/usr/sbin/apxs' '--enable-cli' '--with-config-file-path=/etc' '--with-libxml-dir=/usr' '--with-openssl=/usr' '--with-kerberos=/usr' '--with-zlib=/usr' '--enable-bcmath' '--with-bz2=/usr' '--enable-calendar' '--with-curl=/usr' '--enable-dba' '--with-ndbm=/usr' '--enable-exif' '--enable-ftp' '--with-gd' '--with-freetype-dir=/usr/X11/' '--with-jpeg-dir=/usr/local' '--with-png-dir=/usr/X11/' '--enable-gd-native-ttf' '--with-icu-dir=/usr' '--with-iodbc=/usr' '--with-ldap=/usr' '--with-ldap-sasl=/usr' '--with-libedit=/usr' '--enable-mbstring' '--enable-mbregex' '--with-mysql=mysqlnd' '--with-mysqli=mysqlnd' '--without-pear' '--with-pdo-mysql=mysqlnd' '--with-mysql-sock=/var/mysql/mysql.sock' '--with-readline=/usr' '--enable-shmop' '--with-snmp=/usr' '--enable-soap' '--enable-sockets' '--enable-sysvmsg' '--enable-sysvsem' '--enable-sysvshm' '--with-tidy' '--enable-wddx' '--with-xmlrpc' '--wit