Skip to content

Instantly share code, notes, and snippets.

View natanfelles's full-sized avatar
💥
Hunting bugs!

Natan Felles natanfelles

💥
Hunting bugs!
View GitHub Profile
@natanfelles
natanfelles / theme_darcula.xml
Created June 13, 2016 14:48
gedit darcula theme
<?xml version="1.0" encoding="UTF-8"?>
<style-scheme id="darcula" _name="Darcula" version="1.0">
<author>Sash0k</author>
<_description>Dark color scheme using IntelliJ IDEA colors</_description>
<!-- Scribe Theme Generator 1.3 -->
<!-- COLORS -->
<color name="comment_color" value="#629755"/>
@natanfelles
natanfelles / lemp
Last active November 20, 2018 20:57
Easy LEMP Management
#!/bin/bash
# Author: Natan Felles <[email protected]>
# Description: Easy LEMP Management
# Local: /usr/local/bin/lemp
# Foreground colors
declare -A COLOR
COLOR[default]=$(tput sgr0)
COLOR[red]=$(tput setaf 1)
COLOR[green]=$(tput setaf 2)
@natanfelles
natanfelles / url_slug.js
Created July 27, 2016 22:32 — forked from sgmurphy/url_slug.js
URL Slugs in Javascript (with UTF-8 and Transliteration Support)
/**
* Create a web friendly URL slug from a string.
*
* Requires XRegExp (http://xregexp.com) with unicode add-ons for UTF-8 support.
*
* Although supported, transliteration is discouraged because
* 1) most web browsers support UTF-8 characters in URLs
* 2) transliteration causes a loss of information
*
* @author Sean Murphy <[email protected]>

How to setup gitlab without embedded nginx

Install via omnibus-package

install the normal way:

wget https://downloads-packages.s3.amazonaws.com/ubuntu-14.04/gitlab_7.7.2-omnibus.5.4.2.ci-1_amd64.deb & > /dev/null

sudo apt-get update
sudo apt-get upgrade
@natanfelles
natanfelles / Access.php
Created December 14, 2016 19:51
CodeIgniter Strong Password Validation
<?php
/**
* @author Natan Felles <[email protected]>
*/
defined('BASEPATH') or exit('No direct script access allowed');
/**
* Class Access
*/
class Access extends CI_Controller {
@natanfelles
natanfelles / db_helper.php
Last active August 18, 2023 03:15
CodeIgniter Database Helper to Add and Drop Foreign Keys and Triggers
<?php
/**
* @author Natan Felles <[email protected]>
*/
defined('BASEPATH') OR exit('No direct script access allowed');
if ( ! function_exists('add_foreign_key'))
{
/**
* @param string $table Table name
@natanfelles
natanfelles / form-prompts.js
Last active December 18, 2017 08:49
Semantic UI Form Prompts · Portuguese Brazilian [pt-br]
var lang = {
// Text
unspecifiedRule: 'Por favor, insira um valor válido',
unspecifiedField: 'Este campo',
// Prompt
empty: '{name} deve ter um valor',
checked: '{name} deve ser marcado',
email: '{name} deve ser um valid e-mail',
url: '{name} deve ser uma url válida',
regExp: '{name} não está formatado corretamente',
@natanfelles
natanfelles / atom-php.md
Last active January 25, 2024 03:48
Atom PHP Environment + CodeIgniter 3 & 4

Atom PHP Environment + CodeIgniter 3 & 4

Atom Editor

Install

Download and install Atom Editor:

cd ~/Downloads
@natanfelles
natanfelles / estados-cidades.json
Created July 4, 2017 00:14 — forked from letanure/estados-cidades.json
JSON estados cidades
{
"estados": [
{
"sigla": "AC",
"nome": "Acre",
"cidades": [
"Acrelândia",
"Assis Brasil",
"Brasiléia",
"Bujari",
@natanfelles
natanfelles / serve.sh
Created July 18, 2017 19:38
Serve Jekyll According to Environment
#!/bin/bash
# Author: Natan Felles <[email protected]>
# Description: Serve Jekyll According to Environment
echo -n "Environment [d = development, p = production]: "
read ENV
rm -r .sass-cache/
rm -r _site/
rm .jekyll-metadata