Skip to content

Instantly share code, notes, and snippets.

View ceccode's full-sized avatar
🏠
Working from home

Francesco Falanga ceccode

🏠
Working from home
View GitHub Profile
@ceccode
ceccode / deploy_awsS3.sh
Created January 24, 2017 15:43
Bash script for deploy dist folder in production branch and on AWS S3 (optional)
#!/usr/bin/env sh
# Use AWS cli
# Thanks to https://zellwk.com/blog/deploy-static-site/
DIST_FOLDER="dist"
AWS_CLI_PROFILE="your-profile-name"
AWS_BUCKET="your bucket name/"
PRODUCTION_BRANCH_NAME="your-production-branch"
@ceccode
ceccode / iterm2-solarized.md
Created August 17, 2016 12:25 — forked from kevin-smets/iterm2-solarized.md
iTerm2 + Oh My Zsh + Solarized color scheme + Meslo powerline font (OS X / macOS)

Solarized

@ceccode
ceccode / performRequest.js
Last active July 26, 2016 15:26
Simple module that wrap nodejs http.request api.
"use strict";
const http = require('http');
const util = require('util');
const querystring = require('querystring');
function addQueryString(data) {
return (data !== "") ? querystring.stringify(data) : '';
}
<?php
namespace App\Http\Middleware;
use Closure;
use Illuminate\Contracts\Routing\Middleware;
use Illuminate\Contracts\Foundation\Application;
class ReplaceTestVars implements Middleware
{
@ceccode
ceccode / wordpress .gitignore
Last active November 9, 2015 16:32 — forked from salcode/.gitignore
WordPress .gitignore
# -----------------------------------------------------------------
# Forked .gitignore for WordPress by @salcode, ver 20150227
#
# ver. 0.1 @ceccode
#
#
# By default all files are ignored. You'll need to whitelist
# any mu-plugins, plugins, or themes you want to include in the repo.
#
# To ignore uncommitted changes in a file that is already tracked, use
/**
* ================== angular-ios9-uiwebview.patch.js v1.1.1 ==================
*
* This patch works around iOS9 UIWebView regression that causes infinite digest
* errors in Angular.
*
* The patch can be applied to Angular 1.2.0 1.4.5. Newer versions of Angular
* have the workaround baked in.
*
* To apply this patch load/bundle this file with your application and add a
@ceccode
ceccode / info.plist
Created October 22, 2015 13:11 — forked from mlynch/info.plist
Disable App Transport Security in iOS 9
<!--
This disables app transport security and allows non-HTTPS requests.
Note: it is not recommended to use non-HTTPS requests for sensitive data. A better
approach is to fix the non-secure resources. However, this patch will work in a pinch.
To apply the fix in your Ionic/Cordova app, edit the file located here:
platforms/ios/MyApp/MyApp-Info.plist
And add this XML right before the end of the file inside of the last </dict> entry:
@ceccode
ceccode / wpml_lang_switcher.php
Created June 29, 2015 08:28
WPML lang switcher
<?php
$languages = icl_get_languages('skip_missing=0&orderby=code');
if(!empty($languages)){
$i = 0;
$numItems = count(languages);
foreach($languages as $l){
if(!$l['active']) {
echo '<a href="'.$l['url'].'">';
}
echo $l['language_code'];
@ceccode
ceccode / pb-ion-sure-click.js
Created February 2, 2015 17:51
Ionic framework confirm directive
/**
* Ionic framework confirm directive
* thanks to: https://gist.github.com/asafge
*
* USAGE: pb-ion-sure-title="Confirm" pb-ion-sure-message="Are you sure" pb-ion-sure-click="funtion()"
*/
.directive('pbIonSureClick', ['$ionicPopup','$timeout', function($ionicPopup, $timeout) {
return {
restrict: 'A',
link: function(scope, element, attrs) {
@ceccode
ceccode / ng-really.js
Last active August 29, 2015 14:14 — forked from asafge/ng-really.js
/**
* A generic confirmation for risky actions.
* Usage: Add attributes: ng-really-message="Are you sure"? ng-really-click="takeAction()" function
*/
angular.module('app').directive('ngReallyClick', [function() {
return {
restrict: 'A',
link: function(scope, element, attrs) {
element.bind('click', function() {
var message = attrs.ngReallyMessage;