Skip to content

Instantly share code, notes, and snippets.

@jakebellacera
jakebellacera / how-to-install-memcache-on-mamp-2.md
Last active July 4, 2021 16:09
How To Install Memcache on MAMP 2

How To Install Memcache on MAMP 2

Note: This is an old guide and may not work for newer versions of macOS. Please see comments below for additional steps.

  1. Install memcached. I'd suggest using homebrew. brew install memcached
  2. Select your desired version of PHP that you'd like to use in MAMP. This dropdown is located in the PHP tab in MAMP PRO.
  3. Visit the Downloads Page on php.net and download the source code. If your release isn't listed, visit the Releases page.
  4. Extract the source into /Applications/MAMP/bin/php/[php version folder]/include/php.
  5. /Applications/MAMP/bin/php/[php version folder]/include/php/configure
  6. /Applications/MAMP/bin/php/[php version folder]/bin/pecl i memcache.
@suziewong
suziewong / git.md
Last active March 17, 2024 08:36
github的多人协作?how to 贡献代码?

github的多人协作

  1. github上你可以用别人的现成的代码 直接 git clone 即可了

  2. 然后你也想改代码或者贡献代码咋办?

Fork

@titanew
titanew / gist:5624479
Last active December 17, 2015 14:29
判断字符串中是否还有重复的字母或者数字。
//一种用普通的字符串的方法,另外一种用正则,还是正则的扩展性高一点。。
//方法一:字符串方法
function ifRepeat(str) {
var ss = str;
for (var i = 0; i < ss.length; i++) {
var cha = ss.charAt(i);
var sub = ss.substring(0,i)+ss.substring(i+1);
if (sub.indexOf(cha)!=-1) {
console.log("有重复");