Skip to content

Instantly share code, notes, and snippets.

@wozzup
wozzup / gist:7059400
Created October 19, 2013 18:10
MAMP composer
sudo nano ~/.bash_profile
# add PATH
export PATH="/Applications/MAMP/bin/php/php5.4.10/bin:$PATH"
# run
. .bash_profile
# test
which php
@wozzup
wozzup / dnspodsh.sh
Created October 30, 2013 10:33 — forked from zrong/dnspodsh.sh
#!/bin/bash
##############################
# dnspodsh v0.3
# 基于dnspod api构架的bash ddns客户端
# 作者:zrong(zengrong.net)
# 详细介绍:http://zengrong.net/post/1524.htm
# 创建日期:2012-02-13
# 更新日期:2012-03-11
##############################
@wozzup
wozzup / README.md
Created December 5, 2013 11:12 — forked from chuangbo/README.md

替换上你的Email,密码,域名ID,记录ID等参数,就可以运行了。 会在后台一直运行,每隔30秒检查一遍IP,如果修改了就更新IP。

获得domain_id可以用curl curl -k https://dnsapi.cn/Domain.List -d "login_email=xxx&login_password=xxx"

获得record_id类似 curl -k https://dnsapi.cn/Record.List -d "login_email=xxx&login_password=xxx&domain_id=xxx"

@wozzup
wozzup / gist:9793176
Last active May 22, 2022 14:11
Installing ImageMagick on Mac OSX for PHP and MAMP
Manual Installation
Install Ghostscript
Ghostscript is going to be doing the actual conversion for ImageMagick
`brew install ghostscript
If there is a failure try running brew update and then the command again.
Compile ImageMagick
//you may have some more configs here...
providers:
user:
entity: { class: MyAppBundle:User, property: loginEmail }
admin:
entity: { class: MyAppBundle:Admin, property: username }
firewalls:
dev:
pattern: ^/(_(profiler|wdt)|css|images|js)/
security: false
imports:
# ....
- { resource: services/session.yml }
framework:
# ....
session:
handler_id: session.handler.memcached
sudo setfacl -R -m u:www-data:rwX -m u:`whoami`:rwX cache
sudo setfacl -dR -m u:www-data:rwX -m u:`whoami`:rwX cache
#############################################################################
# current prompt
#############################################################################
# \d – Current date
# \t – Current time
# \h – Host name
# \# – Command number
# \u – User name
# \W – Current working directory (ie: Desktop/)
# \w – Current working directory, full path (ie: /Users/Admin/Desktop)
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
class MY_Session extends CI_Session{
private $sess_use_redis = TRUE;
private $redis = '';
public function __construct($params = array()) {
//parent::__construct();
$this->CI =& get_instance();
@wozzup
wozzup / angularjs vs
Last active August 29, 2015 14:17 — forked from kentcdodds/README.md
#Hello World Characters of Code Comparison
##JavaScript
[Preview](http://embed.plnkr.co/blHgfEJV8y2yQcWZKRqo/preview)
Characters: 700
Lines of JavaScript: 13