Awesome PHP has been relocated permanently to its own Github repository. No further updates will made to this gist.
Please open an issue for any new suggestions.
Awesome PHP has been relocated permanently to its own Github repository. No further updates will made to this gist.
Please open an issue for any new suggestions.
<?php | |
/** | |
* On-the-fly CSS Compression | |
* Copyright (c) 2009 and onwards, Manas Tungare. | |
* Creative Commons Attribution, Share-Alike. | |
* | |
* In order to minimize the number and size of HTTP requests for CSS content, | |
* this script combines multiple CSS files into a single file and compresses | |
* it on-the-fly. | |
* |
<?php | |
class ImageFetcher | |
{ | |
protected $url; | |
public function __construct() | |
{ | |
libxml_use_internal_errors(true); | |
} | |
Other people's projects:
My projects (tutorials are on my blog at http://maxoffsky.com):
// An example viewDidLoad | |
- (void)viewDidLoad | |
{ | |
[super viewDidLoad]; | |
[self loadWebView]; | |
} | |
// The example loader | |
// | |
// Assumes you have an IBOutlet for the UIWebView defined: @property (strong, nonatomic) UIWebView *wv; |
<!doctype html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<title>App Redirection</title> | |
</head> | |
<body> | |
<!-- iframe used for attempting to load a custom protocol --> | |
<iframe style="display:none" height="0" width="0" id="loader"></iframe> |
# hhvm - HipHop VM | |
# | |
# The HipHopVM server provides a high performance PHP stack and web server. | |
# modified by pjv from original found here: http://stackoverflow.com/questions/19013516/upstart-script-for-hhvm-hiphop | |
description "HHVM server" | |
author "pjv https://gist.github.com/pjv/2e9ab32d8d9884bf79a4" | |
start on filesystem or runlevel [2345] | |
stop on runlevel [!2345] |
sudo aptitude install git -y | |
git clone https://github.com/pooler/cpuminer | |
cd cpuminer | |
sudo aptitude install automake -y | |
sudo aptitude install pkg-config -y | |
sudo aptitude install gcc -y | |
sudo aptitude install make -y | |
sudo aptitude install libcurl3-gnutls-dev -y | |
./autogen.sh | |
./configure CFLAGS="-O3" |
##Setting spaces between characters with Swift (iOS)
###UIButton
@IBOutlet weak var button: UIButton!
button.titleLabel?.attributedText = NSAttributedString(string: string, attributes:[ NSKernAttributeName: 1.3])