Skip to content

Instantly share code, notes, and snippets.

@createproblem
createproblem / ubuntu_agnoster_install.md
Created May 4, 2018 08:22 — forked from renshuki/ubuntu_agnoster_install.md
Ubuntu 16.04 + Terminator + Oh My ZSH with Agnoster Theme

Install Terminator (shell)

sudo add-apt-repository ppa:gnome-terminator
sudo apt-get update
sudo apt-get install terminator

Terminator should be setup as default now. Restart your terminal (shortcut: "Ctrl+Alt+T").

Install ZSH

VERSION=${1:-5.5.9}
PHP_DIR=$HOME/.phpenv/versions/$VERSION
pushd $HOME/.php-build/bin
test -x $PHP_DIR/bin/php || ./php-build -i development $VERSION $PHP_DIR
popd
phpenv global $VERSION
@createproblem
createproblem / Grundfile.js
Created June 26, 2014 07:36
Gruntfile for foundation with sass
// Generated on 2014-06-26 using generator-angular 0.9.1
'use strict';
// # Globbing
// for performance reasons we're only matching one level down:
// 'test/spec/{,*/}*.js'
// use this if you want to recursively match all subfolders:
// 'test/spec/**/*.js'
module.exports = function (grunt) {
@createproblem
createproblem / user.js
Last active August 29, 2015 14:02
angularjs resource init
'use strict';
angular.module('mnjsUser', ['ngResource']).factory('UserApi', ['$resource', '$cookieStore',
function($resource, $cookieStore) {
var token = $cookieStore.get('token') || {};
return {
init: function() {
token = $cookieStore.get('token') || {};
[Info]: Loaded apc Plugin.
[Info]: Loaded pyrus Plugin.
[Info]: Loaded xdebug Plugin.
[Info]: Loaded xhprof Plugin.
[Info]: php.ini-development gets used as php.ini
[Info]: Building 5.4.23 into /home/someuser/.phpenv/versions/5.4.23
[Downloading]: http://php.net/distributions/php-5.4.23.tar.bz2
[Preparing]: /tmp/php-build/source/5.4.23
[Compiling]: /tmp/php-build/source/5.4.23
[Pyrus]: Downloading from http://pear2.php.net/pyrus.phar
<div id="cs_feedback_pane" ><!-- iframe here --></div>
<a href="javascript:void(0)" id="cs_panel_link" onclick= "loadIframe(); return false;">Load iframe inside div</a>
<script type="text/javascript">
function loadIframe () {
var iframe = document.createElement('iframe');
iframe.frameBorder=0;
iframe.setAttribute("src", 'http://www.google.com');
document.getElementById('cs_feedback_pane').appendChild(iframe);
<?php
/*
* This file is part of the g5ToolsBundle package.
*
* (c) createproblem <https://github.com/createproblem/>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
@createproblem
createproblem / gist:6621289
Created September 19, 2013 09:46
PHP Sorting tests
<?php
$files = scandir('.', SCANDIR_SORT_DESCENDING);
var_dump($files);
sort($files, SORT_REGULAR);
var_dump($files);
?>