Skip to content

Instantly share code, notes, and snippets.

View leoruhland's full-sized avatar

Leonardo Ruhland leoruhland

View GitHub Profile
@pixeline
pixeline / php_upgrade_to_71.sh
Last active March 16, 2023 16:49
Update Mac Os X's php version to php 7.1 using homebrew. Includes curl and mcrypt
# 1. Install brew --> http://brew.sh/
# 2. run the following commands in your Terminal
brew tap homebrew/dupes
brew tap homebrew/versions
brew tap homebrew/homebrew-php
brew install --with-openssl curl
brew install --with-homebrew-curl --with-apache php71
brew install php71-mcrypt php71-imagick
# 3. Follow these instructions to make Apache and php-cli use the newer php executable and make the change persist after reboot.
brew info php71
@btroncone
btroncone / rxjs_operators_by_example.md
Last active July 16, 2023 14:57
RxJS 5 Operators By Example
@btroncone
btroncone / ngrxintro.md
Last active February 9, 2024 15:37
A Comprehensive Introduction to @ngrx/store - Companion to Egghead.io Series

Comprehensive Introduction to @ngrx/store

By: @BTroncone

Also check out my lesson @ngrx/store in 10 minutes on egghead.io!

Update: Non-middleware examples have been updated to ngrx/store v2. More coming soon!

Table of Contents

@cdarken
cdarken / Ionic production build
Created December 24, 2014 08:23
Quick solution for ionic build optimized
Step 1: Add some npm packages to your devDependencies section in package.json:
"gulp-usemin": "^0.3.8",
"gulp-util": "^2.2.14",
"run-sequence": "^1.0.2",
"shelljs": "^0.3.0"
Step 2: Import them in gulpfile.js:
var sh = require('shelljs');
@nolanlawson
nolanlawson / cordova-to-crosswalk.md
Last active May 24, 2018 05:24
Helper script to convert an Ionic/Cordova app to a Crosswalk app

Convert a Cordova/Ionic project to a Crosswalk project

Converts an existing Cordova/Ionic project to a Crosswalk project. When the script is done running, you should have a fat 40MB APK file in platforms/android/ant-build.

This assumes you have the following already installed: cordova, ant, android, and that your ANDROID_HOME is set to point to the Android SDK.

This will work on both x86 and ARM. If you want to build two separate APKs so that they're smaller, then modify the script; the script at least shows how it works.

Step 1: download the "Cordova Android" libraries from the Crosswalk downloads page. You don't need anything except for the "Cordova Android" ones.

@Evanion
Evanion / .bowerrc
Last active April 18, 2017 16:14
Revised Ionic build environment
{
"directory": "vendor"
}
@fazlurr
fazlurr / canvas-upload.php
Created March 27, 2014 07:20 — forked from xjamundx/canvas-upload.php
Function to save base64 image to png with PHP
<?php
// requires php5
define('UPLOAD_DIR', 'images/');
$img = $_POST['img'];
$img = str_replace('data:image/png;base64,', '', $img);
$img = str_replace(' ', '+', $img);
$data = base64_decode($img);
$file = UPLOAD_DIR . uniqid() . '.png';
$success = file_put_contents($file, $data);
print $success ? $file : 'Unable to save the file.';
@CMCDragonkai
CMCDragonkai / angularjs_directive_attribute_explanation.md
Last active November 29, 2023 15:35
JS: AngularJS Directive Attribute Binding Explanation

AngularJS Directive Attribute Binding Explanation

When using directives, you often need to pass parameters to the directive. This can be done in several ways. The first 3 can be used whether scope is true or false. This is still a WIP, so validate for yourself.

  1. Raw Attribute Strings

    <div my-directive="some string" another-param="another string"></div>