Skip to content

Instantly share code, notes, and snippets.

View miloplacencia's full-sized avatar

Camilo Placencia Ulloa miloplacencia

View GitHub Profile
@dmlogic
dmlogic / AngularTrait.php
Last active August 29, 2015 14:03
Securing Angular with Laravel
<?php namespace MyApp\Response;
use Cookie;
use Request;
use Session;
use Symfony\Component\HttpFoundation\Cookie as SymfonyCookie;
trait AngularTrait {
/**
@mignev
mignev / gist:1683387
Created January 26, 2012 15:46
Simple example of webview in appcelerator
// this sets the background color of the master UIView (when there are no windows/tab groups on it)
Titanium.UI.setBackgroundColor('#000');
// create tab group
var tabGroup = Titanium.UI.createTabGroup();
//
// create base UI tab and root window
//
@achiko
achiko / gist:9570304
Created March 15, 2014 16:51
How To Install CouchDB from Source on a CentOS 6 x64 VPS
1 Heloo :)
2 yum update
3 reboot
4 yum localinstall http://epel.mirror.srv.co.ge/6/i386/epel-release-6-8.noarch.rpm
5 uname -rs
6 yum localinstall http://pkgs.repoforge.org/rpmforge-release/rpmforge-release-0.5.3-1.el6.rf.x86_64.rpm
7 yum update
8 yum install gcc
9 yum install make
@nathanharper
nathanharper / default-csrf.js
Last active January 22, 2018 11:56
axios default CSRF Token
let csrfToken = 'lololololol';
let axiosDefaults = require('axios/lib/defaults');
axiosDefaults.headers.common['X-CSRF-Token'] = csrfToken;
@MikeRogers0
MikeRogers0 / twitter-proxy.php
Last active June 3, 2019 12:56
This is a neat little script you can use to quickly make OAuth requests to the twitter rest API v1.1.
<?php
/**
* Usage:
* Send the url you want to access url encoded in the url paramater, for example (This is with JS):
* /twitter-proxy.php?url='+encodeURIComponent('statuses/user_timeline.json?screen_name=MikeRogers0&count=2')
*/
// The tokens, keys and secrets from the app you created at https://dev.twitter.com/apps
$config = array(
@thomasfr
thomasfr / nginx.conf
Last active December 1, 2019 20:04
nginx vhost / site config file
upstream node_backend {
server 127.0.0.1:3000;
keepalive 32;
}
server {
root /var/www/testapp/public;
index index.html;
@nnarhinen
nnarhinen / Gruntfile.js
Last active February 11, 2020 09:39
Support html5 pushState (or angular.js html5mode) in a yeoman (grunt-contrib-connect) application.
module.exports = function (grunt) {
// show elapsed time at the end
require('time-grunt')(grunt);
// load all grunt tasks
require('load-grunt-tasks')(grunt);
//MODIFIED: add require for connect-modewrite
var modRewrite = require('connect-modrewrite');
grunt.initConfig({
@adilapapaya
adilapapaya / README
Last active June 27, 2020 11:58
Export Table Data to CSV using Javascript
Example code for exporting data in a table to a csv file.
git rm -r --cached .
git add .
git commit -m ".gitignore is now working"
@sink66
sink66 / setup-taiga-centos.sh
Last active October 1, 2021 13:36
Taiga.io minimum install & run commands / CentOS7.2
#!/bin/bash
# How to use
# 1. Replace the "YOURIP" to yourIP
#sed -i -e 's/YOURIP/192.168.x.x/g' setup-taiga-centos.sh
# 2. Run at the root
#source setup-taiga-centos.sh