Skip to content

Instantly share code, notes, and snippets.

@yevrah
yevrah / Upgrade vim
Last active September 25, 2023 05:11
Update to Vim8 on Centos 7
################################################################################
# Method 1: Install using rpm packages (credit to DarkMukke)
#
rpm -Uvh http://mirror.ghettoforge.org/distributions/gf/gf-release-latest.gf.el7.noarch.rpm
rpm --import http://mirror.ghettoforge.org/distributions/gf/RPM-GPG-KEY-gf.el7
# WARNING: removing vim-minimal uninstalls `sudo` if you skip the second step
# make sure to at least run `yum install sudo`
yum -y remove vim-minimal vim-common vim-enhanced
@YukiYamashina
YukiYamashina / README.md
Last active October 21, 2020 08:45
QdmailをPHP7.0に対応させる

QdmailをPHP7.0に対応させる

  • コンストラクタ名を__constructorに修正
  • newの前の&を削除
  • QdmailComponent内のfunction & smtpObjectの引数をスーパークラスと合わせて$null = falseに修正
  • HTMLメールでのマルチパート順序をhtml, plain, OMITからplain, html, OMITへ変更
  • iPhone用アドレスをi.softbank.ne.jpからi.softbank.jpに修正
@keijiro
keijiro / test.md
Last active August 29, 2015 14:09

GitHubギッハブ Flavoredフレイヴァード Markdownマークダウン においては ruby タグを用もちいる事ことで漢かん字じに紅ル玉ビを振ふる事ことが可能なできるのだッッ!!!

@pwenzel
pwenzel / lamp-stack-osx-virtualhostx.md
Last active April 8, 2022 04:00
LAMP stack on OSX with Homebrew, built-in Apache, multiple PHP versions, VirtualhostX optional

This guide shows how to set up a PHP and MySQL development environment using OSX's built-in Apache, using Homebrew to install necessary components. With this strategy, you can use different versions of PHP for certain virtual hosts.

VirtualHostX is a convenient way to manage development sites, but not required.

Install PHP and MySQL with Homebrew

brew update
brew install php56
brew install php56-mcrypt
brew install mysql
@irasally
irasally / Boxfile
Last active December 23, 2015 14:19
pagoda Boxfile for CakePHP
web1:
document_root: /app/webroot
shared_writable_dirs:
- app/tmp
- app/tmp/cache
- app/tmp/logs
- app/tmp/sessions
- app/tmp/tests
php_version: 5.4.14
php_extensions:

すぐれた PHP ライブラリとリソース

Awesome PHP の記事をフォークして翻訳したものです (2013年4月25日)。おどろくほどすごい PHP ライブラリ、リソースやちょっとした情報のリストです。

【訳者コメント】 PHP 入門者のかたにはクィックリファレンスとして PHP: The Right Way 、セキュリティに関しては2011年3月に出版された 体系的に学ぶ 安全なWebアプリケーションの作り方 をおすすめします。

Composer

@andyferra
andyferra / github.css
Created April 30, 2012 02:11
Github Markdown CSS - for Markdown Editor Preview
body {
font-family: Helvetica, arial, sans-serif;
font-size: 14px;
line-height: 1.6;
padding-top: 10px;
padding-bottom: 10px;
background-color: white;
padding: 30px; }
body > *:first-child {
@sime
sime / schema.php
Created February 26, 2012 15:01
Possible example of using the CakePHP Schema callback `after` to insert content in the database
<?php
// Possible example of using the CakePHP Schema callback `after`
// to insert content in the database.
// Inspiration: https://github.com/majna/schema
// Copy schema.php to app/Config/Schema
// Run: ./Console/cake schema create
App::uses('ClassRegistry', 'Utility');
class AppSchema extends CakeSchema {
@rtlong
rtlong / AutoTune_SomaFM_MPD.rb
Created August 27, 2011 08:09
Use this simple ruby script to automate grabbing all the SomaFM stations and saving each as a playlist into MPD.
# Make sure you can use mpc from your command line before running this.
soma = { "Groove Salad (ambient/electronica)" => 'groovesalad',
"Suburbs of Goa (world)" => 'suburbsofgoa',
"Lush (electronica)" => 'lush',
'Digitalis (electronica/alternative)' => 'digitalis',
'480 Minutes (alternative)' => '480min',
'Indie Pop Rocks! (alternative)' => 'indiepop',
'PopTron (alternative)' => 'poptron',
'Black Rock FM (eclectic)' => 'brfm',
@ordinz
ordinz / gist:674274
Created November 12, 2010 16:10
http_build_query.js
function urlencode (str) {
str = (str+'').toString();
return encodeURIComponent(str).replace(/!/g, '%21').replace(/'/g, '%27').replace(/\(/g, '%28').replace(/\)/g, '%29').replace(/\*/g, '%2A').replace(/%20/g, '+');
};
function http_build_query(formdata, numeric_prefix, arg_separator){
var value, key, tmp = [], that = this;
var _http_build_query_helper = function (key, val, arg_separator) {
var k, tmp = [];