Skip to content

Instantly share code, notes, and snippets.

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

Natan Felles natanfelles

💥
Hunting bugs! Follow me.
View GitHub Profile
@natanfelles
natanfelles / config.json
Created April 2, 2016 10:46 — forked from anonymous/config.json
Bootstrap Customizer Config
{
"vars": {
"@gray-base": "#000",
"@gray-darker": "lighten(@gray-base, 13.5%)",
"@gray-dark": "lighten(@gray-base, 20%)",
"@gray": "lighten(@gray-base, 33.5%)",
"@gray-light": "lighten(@gray-base, 46.7%)",
"@gray-lighter": "lighten(@gray-base, 93.5%)",
"@brand-primary": "darken(#e04028, 6.5%)",
"@brand-success": "#5cb85c",
.gist {
color: #000;
}
.gist div {
padding: 0;
margin: 0;
}
.gist .gist-file {
@natanfelles
natanfelles / Embedding-Gist.htm
Created May 25, 2016 21:57 — forked from DinoChiesa/Embedding-Gist.htm
Embed a Gist using jQuery.
<link href="http://yandex.st/highlightjs/7.0/styles/default.min.css" rel="stylesheet">
<script src="http://yandex.st/highlightjs/7.0/highlight.min.js"></script>
<script type='text/javascript'> $(document).ready(function() {
function fixup(s) {
var re1 = new RegExp('<','g'), re2 = new RegExp('>','g');
return s.replace(re1,'&lt;').replace(re2,'&gt;');
}
$.ajax({type: "GET",
url: "https://api.github.com/gists/5617520",
@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 <sean@iamseanmurphy.com>

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 / 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 / gist:f6999bc296a63af2881d9a68fc12945f
Created July 29, 2017 12:44 — forked from niallo/gist:3109252
Parse Github `Links` header in JavaScript
/*
* parse_link_header()
*
* Parse the Github Link HTTP header used for pageination
* http://developer.github.com/v3/#pagination
*/
function parse_link_header(header) {
if (header.length == 0) {
throw new Error("input must not be of zero length");
}
@natanfelles
natanfelles / nogap.php
Created July 29, 2017 16:41 — forked from artoodetoo/nogap.php
Efficient Geo IP location in MySQL database
#!/usr/bin/env php
<?php
/*
* Filter to fill the IP gaps in a MaxMind GeoLite tables.
*
* For every missing range in the file it puts a dummy one.
*/
$types = [
'asnum' => [0, 0, 1, "%s,%s,\"-\"\n"],
'blocks' => [2, 0, 1, "\"%s\",\"%s\",\"1\"\n"],
@natanfelles
natanfelles / gist:c5e157672f63f66a13940f1842f9c51c
Created December 14, 2017 05:21 — forked from rxaviers/gist:7360908
Complete list of github markdown emoji markup

People

:bowtie: :bowtie: 😄 :smile: 😆 :laughing:
😊 :blush: 😃 :smiley: ☺️ :relaxed:
😏 :smirk: 😍 :heart_eyes: 😘 :kissing_heart:
😚 :kissing_closed_eyes: 😳 :flushed: 😌 :relieved:
😆 :satisfied: 😁 :grin: 😉 :wink:
😜 :stuck_out_tongue_winking_eye: 😝 :stuck_out_tongue_closed_eyes: 😀 :grinning:
😗 :kissing: 😙 :kissing_smiling_eyes: 😛 :stuck_out_tongue:
@natanfelles
natanfelles / Install-xdebug-php7.1.md
Created January 11, 2018 20:59 — forked from asanikovich/Install-xdebug-php7.1.md
Installing xdebug for php7.1 on Ubuntu 14.04

Install xdebug extension

# Download stable release of xdebug from https://xdebug.org/download.php
wget -c "https://xdebug.org/files/xdebug-2.5.3.tgz"
# Extract archive
tar -xf xdebug-2.5.3.tgz

cd xdebug-2.5.3/