Skip to content

Instantly share code, notes, and snippets.

View piotr-cz's full-sized avatar
👋

Piotr piotr-cz

👋
View GitHub Profile
@joepie91
joepie91 / gulpfile.js
Last active August 29, 2015 14:04
Gulpfile for Express + CoffeeScript + Theseus + Nodemon + LiveReload
var gulp = require('gulp');
var path = require('path');
var gutil = require('gulp-util');
var concat = require('gulp-concat');
var rename = require('gulp-rename');
var coffee = require('gulp-coffee');
var cache = require('gulp-cached');
var remember = require('gulp-remember');
var plumber = require('gulp-plumber');
@staltz
staltz / introrx.md
Last active April 13, 2025 15:46
The introduction to Reactive Programming you've been missing
@toxuin
toxuin / gist:b6047b0f3269106fb95d
Last active April 5, 2023 12:31
Use mac diskutil in single-user mode
/sbin/fsck -fy
mount -uw /
launchctl load /System/Library/LaunchDaemons/com.apple.notifyd.plist
launchctl load /System/Library/LaunchDaemons/com.apple.configd.plist
launchctl load /System/Library/LaunchDaemons/com.apple.diskmanagementd.plist
launchctl load /System/Library/LaunchDaemons/com.apple.securityd.plist
launchctl load /System/Library/LaunchDaemons/com.apple.diskarbitrationd.plist
diskutil rename Macintosh_HD Macintosh\ HD
@bennadel
bennadel / async-alerts.htm
Created May 22, 2014 11:26
Creating Asynchronous Alerts, Prompts, And Confirms In AngularJS
<!doctype html>
<html ng-app="Demo" ng-controller="AppController">
<head>
<meta charset="utf-8" />
<title>
Creating Asynchronous Alerts, Prompts, And Confirms In AngularJS
</title>
</head>
<body>
@stuart11n
stuart11n / gist:9628955
Created March 18, 2014 20:34
rename git branch locally and remotely
git branch -m old_branch new_branch # Rename branch locally
git push origin :old_branch # Delete the old branch
git push --set-upstream origin new_branch # Push the new branch, set local branch to track the new remote
@gustavohenke
gustavohenke / svg2png.js
Created February 18, 2014 15:27
SVG to PNG
var svg = document.querySelector( "svg" );
var svgData = new XMLSerializer().serializeToString( svg );
var canvas = document.createElement( "canvas" );
var ctx = canvas.getContext( "2d" );
var img = document.createElement( "img" );
img.setAttribute( "src", "data:image/svg+xml;base64," + btoa( svgData ) );
img.onload = function() {
anonymous
anonymous / gist:8565929
Created January 22, 2014 19:42
There are a lot of complaints going around about Laravel these days, but a lot
of the important ones seem to be missing from the spotlight.
Bugfixes, issues and pull requests being left open for months with no
clarification of intent:
- https://github.com/laravel/framework/pull/1799
- https://github.com/laravel/framework/issues/1963
- https://github.com/laravel/framework/issues/2089
- https://github.com/laravel/framework/issues/2234
@eddieajau
eddieajau / DataMapper.php
Created December 2, 2013 21:44
Data mappers
<?php
/**
* @copyright Copyright (C) 2005 - 2012 Open Source Matters, Inc. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE
*/
namespace Joomla\Data;
use Psr\Cache\CacheInterface;
@ajaxray
ajaxray / ToArrayExtension.php
Last active May 2, 2024 05:51
A simple twig extension that adds a to_array filter. It will convert an object to array so that you can iterate over it's properties
<?php
// src/YourApp/Bundle/YourBundle/Twig/ToArrayExtension.php
namespace Appcito\Bundle\CoreBundle\Twig;
/**
* A simple twig extension that adds a to_array filter
* It will convert an object to array so that you can iterate over it's properties
*/
class ToArrayExtension extends \Twig_Extension
@waja
waja / php54_deprecated_functions
Last active March 11, 2016 13:18
This shell script could be used to parse DocumentRoots for functions and ini directives problematic with PHP 5.4
#!/bin/bash
#
# PHP 5.4 Deprecated function checker
#
# Version: 0.0.3
#
# Original Author: Michiel Roos <[email protected]>
#
# http://www.php.net/manual/de/migration54.incompatible.php
# http://www.php.net/manual/en/migration54.deprecated.php