Skip to content

Instantly share code, notes, and snippets.

@itspriddle
itspriddle / json.php
Created February 26, 2011 06:48
Pure PHP json library
<?php
/* vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4: */
/**
* Converts to and from JSON format.
*
* JSON (JavaScript Object Notation) is a lightweight data-interchange
* format. It is easy for humans to read and write. It is easy for machines
* to parse and generate. It is based on a subset of the JavaScript
* Programming Language, Standard ECMA-262 3rd Edition - December 1999.
@stilliard
stilliard / jsonToTable.php
Created October 9, 2012 13:24
JSON to HTML table
<?php
/**
* JSON data to html table
*
* @param object $data
*
*/
function jsonToTable ($data)
{
@taiansu
taiansu / Gemfile
Created December 15, 2012 19:05
CashNotes' chart with Morris.js
gem 'raphael-rails'
gem 'morrisjs-rails'
gem 'gon'
#...
@N-Porsh
N-Porsh / gist:7766039
Last active June 7, 2019 01:10
PHP: simple multiple file upload
<?php
$max_file_size = 5*1024*1024; //5MB
$path = "admin/upload/"; // Upload directory
//$count = 0; // nr.successfully uploaded files
$valid_formats = array("rar","zip","7z","pdf","xlsx","xls","docx","doc","txt");
$valid_formats_server = array(
"application/pdf",
"application/octet-stream",

專案名稱: Rails新手村網站

主旨:收集 Rails 有用 Link

基本功能

@sendoa
sendoa / .gitignore
Last active May 7, 2021 12:33
Sendoa's .gitignore for Laravel+PHPStorm projects
/node_modules
/public/storage
/storage/*.key
/vendor
Homestead.yaml
Homestead.json
.env
# ====== OS X ===========================================
.DS_Store
@jaceju
jaceju / web_development_with_laravel_5.md
Last active July 12, 2023 06:34
Laravel 5 測試起手式

Web Development with Laravel 5

目標

如何在開發的過程中加入測試。

  1. Model
  2. Repository
  3. Controller
  4. Auth
@hlb
hlb / Brewfile
Last active June 14, 2022 02:48 — forked from saetia/gist:1623487
Clean Install Script
cask_args appdir: '/Applications'
tap 'caskroom/cask'
tap "homebrew/cask-fonts"
tap 'caskroom/versions'
tap "homebrew/bundle"
tap "homebrew/core"
tap "homebrew/services"
tap "hsatac/toybox"
brew "coreutils"
brew "gnu-sed"
@drmalex07
drmalex07 / README-setup-tunnel-as-systemd-service.md
Last active June 21, 2024 17:44
Setup a secure (SSH) tunnel as a systemd service. #systemd #ssh #ssh-tunnel #ssh-forward

README

Create a template service file at /etc/systemd/system/secure-tunnel@.service. The template parameter will correspond to the name of target host:

[Unit]
Description=Setup a secure tunnel to %I
After=network.target
@756445638
756445638 / README.md
Created June 3, 2016 11:49
Install Samba on Mac OS X

Install Samba 3 on OS X 10.7 Lion

Run the two commands below one at a time to get Samba 3 installed and to have it run on boot.

Install Samba with Homebrew

brew install samba

Set Samba up to launch on boot