Skip to content

Instantly share code, notes, and snippets.

View vinicius73's full-sized avatar
🤓
"Those who cannot acknowledge themselves, will eventually fail."

Vinicius Reis vinicius73

🤓
"Those who cannot acknowledge themselves, will eventually fail."
View GitHub Profile
@danharper
danharper / gulpfile.js
Last active September 25, 2024 09:04
New ES6 project with Babel, Browserify & Gulp
var gulp = require('gulp');
var sourcemaps = require('gulp-sourcemaps');
var source = require('vinyl-source-stream');
var buffer = require('vinyl-buffer');
var browserify = require('browserify');
var watchify = require('watchify');
var babel = require('babelify');
function compile(watch) {
var bundler = watchify(browserify('./src/index.js', { debug: true }).transform(babel));
@franklinjavier
franklinjavier / install-spotify.sh
Last active September 15, 2021 19:17
Install spotify on Arch Linux
wget https://aur.archlinux.org/packages/sp/spotify/spotify.tar.gz && tar -zxvf spotify.tar.gz && cd spotify && makepkg -s
pacman -U spotify<TAB><ENTER>
<?php
/*
Plugin Name: Custom Post Type Archive Menu Links
Plugin URI: http://codeseekah.com/2012/03/01/custom-post-type-archives-in-wordpress-menus-2/
Description: Easily Add Custom Post Type Archives to the Nav Menus
Version: 1.1
Author: soulseekah
Author URI: http://codeseekah.com
License: GPL2
@sweiss3
sweiss3 / git_checkout.lua
Created March 29, 2014 17:22
A clink script for supporting tab-completion of git branches when using "git checkout"
function git_checkout_match_generator(text, first, last)
found_matches = false;
if rl_state.line_buffer:find("^git checkout ") then
has_start_branch = not rl_state.line_buffer:find("^git checkout[ ]*$")
for line in io.popen("git branch 2>nul"):lines() do
local m = line:match("[%* ] (.+)$")
if m then
if not has_start_branch then
clink.add_match(m)
@vividness
vividness / currying_example.js
Last active June 4, 2016 15:12
A sloppy example on JavaScript curry function
/**
* A sloppy example on JavaScript curry function
*
* @author Vladimir Ivic <[email protected]>
* @github http://github.com/mancmelou
*/
/**
* Here we are, the curried function definition
*/
@rudijs
rudijs / gulpfile.js
Last active December 1, 2023 08:20
GulpJS Jshint with Notify on Error
var gulp = require('gulp'),
watch = require('gulp-watch'),
// This will keeps pipes working after error event
plumber = require('gulp-plumber'),
// linting
jshint = require('gulp-jshint'),
stylish = require('jshint-stylish'),
@leandroruel
leandroruel / container-segue-altura-conteudo
Last active August 29, 2015 13:56
com o uso de CSS o código cria um container "seguidor" do conteúdo da página, o elemento vai do topo ao rodapé mesmo com pouco ou nenhum conteúdo.
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Document</title>
<style>
*,
*::after,
*::before {
box-sizing: border-box;
@patrickmaciel
patrickmaciel / routes_and_prefixes.md
Last active September 30, 2020 20:27
Como configurar prefixos e rotas administrativas (autenticadas ou não) no Laravel 4.x #laravel #php
@yyx990803
yyx990803 / starcounter.js
Last active January 16, 2025 09:39
Count your total stars!
var https = require('https'),
user = process.argv[2],
opts = parseOpts(process.argv.slice(3))
request('/users/' + user, function (res) {
if (!res.public_repos) {
console.log(res.message)
return
}
var pages = Math.ceil(res.public_repos / 100),
@bwaidelich
bwaidelich / magicMethodBenchmark.php
Created November 6, 2013 11:34
A simple script to compare performance of magic __call methods to real implementations
<?php
class MagicMethodFixture {
/**
* @var array
*/
protected $configurations;
public function __construct() {
$this->configurations = array(