Skip to content

Instantly share code, notes, and snippets.

View stewones's full-sized avatar
🐠
Cooking something new.

Stewan stewones

🐠
Cooking something new.
View GitHub Profile
git filter-branch --env-filter '
an="$GIT_AUTHOR_NAME"
am="$GIT_AUTHOR_EMAIL"
cn="$GIT_COMMITTER_NAME"
cm="$GIT_COMMITTER_EMAIL"
if [ "$GIT_COMMITTER_EMAIL" = "stewan@estecnologia.com.br" ]
then
cn="Stewan Pacheco"
CREATE DATABASE IF NOT EXISTS `pyro22_dev_rc1` /*!40100 DEFAULT CHARACTER SET latin1 */;
USE `pyro22_dev_rc1`;
-- MySQL dump 10.13 Distrib 5.5.16, for Win32 (x86)
--
-- Host: 127.0.0.1 Database: pyro22_dev_rc1
-- ------------------------------------------------------
-- Server version 5.5.16-log
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
decrease=113
revisioncount=`git log --oneline | wc -l`
revisioncount=$((revisioncount-decrease))
projectversion=`git describe --tags --long`
cleanversion=${projectversion%%-*}
#echo "$projectversion-$revisioncount"
echo "$cleanversion.$revisioncount"
#echo ${projectversion%%-*}
<!-- Mobile viewport optimized -->
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0">
a.run(["$templateCache",
function(a) {
a.put("components/navbar/navbar.html", '<nav class="navbar navbar-static-top navbar-inverse" ng-controller="NavbarCtrl"><div class="navbar-header"><a class="navbar-brand" href="https://github.com/Swiip/generator-gulp-angular"><span class="glyphicon glyphicon-home"></span> Gulp Angular</a></div><div class="collapse navbar-collapse" id="bs-example-navbar-collapse-6"><ul class="nav navbar-nav"><li class="active"><a ng-href="#">Home</a></li><li><a ng-href="#">About</a></li><li><a ng-href="#">Contact</a></li></ul><ul class="nav navbar-nav navbar-right"><li>Current date: {{ date | date:\'yyyy-MM-dd\' }}</li></ul></div></nav>')
}
private function _upload_image() {
// This is a simplified example, which doesn't cover security of uploaded images.
// This example just demonstrate the logic behind the process.
// files storage folder
$dir = base_path('public/temp/');
$_FILES['file']['type'] = strtolower($_FILES['file']['type']);
if ($_FILES['file']['type'] == 'image/png' || $_FILES['file']['type'] == 'image/jpg' || $_FILES['file']['type'] == 'image/gif' || $_FILES['file']['type'] == 'image/jpeg' || $_FILES['file']['type'] == 'image/pjpeg') {
/**
* Store a newly created resource in storage.
*
* @return Response
*/
public function store() {
$request_body = file_get_contents('php://input');
$request_body = json_decode($request_body);
$customer = new EsboxCustomer;
$customer->c_status = $request_body->customer->c_status;
@stewones
stewones / gist:ea91ce030c3cc0ded5cf
Last active August 29, 2015 14:09
esbox api curl workflow
#1 - take the api_token
curl -u fulano@email:senha -X GET http://localhost:8000/v1/
#response json
#{
# "user": {
# "id": "1",
# "email": "fulano@email.com",
# "activated": true,
# "activated_at": null,
<!doctype html>
<html class="no-js" lang="pt-br" ng-app="app.esbox">
<head>
<meta charset="utf-8">
<title>esbox</title>
<meta name="description" content="">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="author" content="ES Tecnologia">
<meta name="robots" content="noindex, nofollow">
<link rel="stylesheet" href="styles/vendor.css">
@stewones
stewones / gist:ba6d04ba00cffafd8a06
Created December 12, 2014 05:56
Jekyll date format replace
{{ post.date | date: "%B %Y" | replace:'January','Janeiro' | replace:'February','Fevereiro' | replace:'March','Março' | replace:'April','Abril' | replace:'May','Maio' | replace:'June','Junho' | replace:'July','Julho' | replace:'August','Agosto' | replace:'September','Setembro' | replace:'October','Outubro' | replace:'November','Novembro' | replace:'December','Dezembro' }}