Skip to content

Instantly share code, notes, and snippets.

View lastguest's full-sized avatar
❄️
I may be slow to respond.

Stefano Azzolini lastguest

❄️
I may be slow to respond.
View GitHub Profile
# Install XCode.
# Install XCode CLI Tools.
# Select XCode.
xcode-select -switch /Applications/Xcode.app/Contents/Developer
# Install Auto Tools.
brew install autoconf automake
# Symlink iOS Simulator.
<?php
class OpenStruct extends ArrayObject
{
public function __construct($input = array())
{
parent::__construct($input, static::ARRAY_AS_PROPS);
}
public function offsetSet($key, $value)
{
<!DOCTYPE HTML>
<html>
<head>
<title>iFrame</title>
</head>
<body>
<!-- Page Content -->
<script src="http://code.jquery.com/jquery-1.10.1.min.js"></script>
<script>
#!/usr/bin/env php
<?php
/* original version can be found at https://gist.github.com/181172 */
if( ! function_exists( 'inotify_init' ) ) {
die_with_error( 'This script needs the inotify module' );
}
$excludePatterns = array(
@lastguest
lastguest / Excel.php
Last active September 6, 2017 09:39 — forked from ihumanable/Excel.php
[Simple Excel writer class] #PHP
<?php
/**
* Simple excel writer class with no external dependencies, drop it in and have fun
* @author Matt Nowack
* @license Unlicensed
* @version 1.0
*/
class Excel {
private $col;
#!/bin/bash
# install homebrew's official php tap
brew tap josegonzalez/homebrew-php
# install homebrew-dupes (required to install zlib, php54's dependency)
brew tap homebrew/dupes
# install nginx + mysql + php 5.4 + php-fpm + apc + xdebug
brew install nginx mysql

Awesome PHP

A list of amazingly awesome PHP libraries, resources and shiny things.

Composer

@lastguest
lastguest / explode.c
Created March 25, 2013 15:37 — forked from kopiro/explode.c
char** explode(char delimiter, char* str) {
int l = strlen(str), i=0, j=0, k=0;
char x = NULL;
char** r = (char**)realloc(r, sizeof(char**));
r[0] = (char*)malloc(l*sizeof(char));
while (i<l+1) {
x = str[i++];
if (x==delimiter || x=='\0') {
r[j][k] = '\0';
r[j] = (char*)realloc(r[j], k*sizeof(char));
@lastguest
lastguest / dabblet.css
Created March 4, 2013 00:24 — forked from LeaVerou/dabblet.css
Failed attempt at gracefully degrading switch-style checkboxes
/**
* Failed attempt at gracefully degrading switch-style checkboxes
* without pseudoelements (which shouldn’t exist on replaced elements) and extra elements.
* Inspired by Espresso’s “Tools” switch
* DO NOT USE. Currently only works properly in WebKit :(
*/
input[type="checkbox"]:not(:checked),
input[type="checkbox"]:checked { /* :checked here acting as a filter for older browsers */
appearance: none;
@lastguest
lastguest / gist:5017485
Last active September 6, 2017 09:40 — forked from kennethreitz/gist:324961
ASCII Faces #ascii #fun #meme
:⌉
=⌉
¦-) as opposed to |
⍥ om nom nom