Skip to content

Instantly share code, notes, and snippets.

View marcoscoelho's full-sized avatar
🐰
welcome

Marcos Coelho marcoscoelho

🐰
welcome
View GitHub Profile
@arya-oss
arya-oss / INSTALL.md
Last active November 18, 2023 13:58
Ubuntu 16.04 Developer Tools installation

Ubuntu 16.04 Developer Tools Installation

First things first !

sudo apt update
sudo apt upgrade

Standard Developer Tools

sudo apt-get install build-essential git
@spalladino
spalladino / mysql-docker.sh
Created December 22, 2015 13:47
Backup and restore a mysql database from a running Docker mysql container
# Backup
docker exec CONTAINER /usr/bin/mysqldump -u root --password=root DATABASE > backup.sql
# Restore
cat backup.sql | docker exec -i CONTAINER /usr/bin/mysql -u root --password=root DATABASE
@tracker1
tracker1 / 01-directory-structure.md
Last active May 4, 2024 19:55
Anatomy of a JavaScript/Node project.

Directory structure for JavaScript/Node Projects

While the following structure is not an absolute requirement or enforced by the tools, it is a recommendation based on what the JavaScript and in particular Node community at large have been following by convention.

Beyond a suggested structure, no tooling recommendations, or sub-module structure is outlined here.

Directories

  • lib/ is intended for code that can run as-is
  • src/ is intended for code that needs to be manipulated before it can be used
@CauanCabral
CauanCabral / readme.markdown
Last active August 7, 2016 09:32
Links de artigos/slides para programadores
@branneman
branneman / call-apply-bind-proxy.js
Last active February 22, 2024 21:06
JavaScript call() vs apply() vs bind() vs $.proxy()
var fn = function(arg1, arg2) {
var str = '<p>aap ' + this.noot + ' ' + arg1 + ' ' + arg2 + '</p>';
document.body.innerHTML += str;
};
var context = {
'noot': 'noot'
};
var args = ['mies', 'wim'];
// Calls a function with a given 'this' value and arguments provided individually.
@lancejpollard
lancejpollard / meta-tags.md
Created March 5, 2012 13:54
Complete List of HTML Meta Tags

Copied from http://code.lancepollard.com/complete-list-of-html-meta-tags/

Basic HTML Meta Tags

<meta name="keywords" content="your, tags"/>
<meta name="description" content="150 words"/>
<meta name="subject" content="your website's subject">
<meta name="copyright"content="company name">
<meta name="language" content="ES">
@alganet
alganet / developerquiz.php
Created August 8, 2011 20:28
Full script for the Google Developer Day Quiz (http://developerquiz.appspot.com) in 39 lines
<?php //Run as command line. Input file as first argument.
const G_FOO = 'aeiou'; //Googlon special letters
const G_INV = 'z'; //Preposition invalidator
const G_PREP = 3; //Preposition size
const G_VERB = 8; //Verb size
const G_ORDER = 'qnbczxjtklmvhrwfsdgp'; //Letter ordering
const G_NUM_MOD = 4; //Pretty number divisor
const G_NUM_MAX = 526593; //Pretty number minimum
$textB = explode(' ', file_get_contents($argv[1]));
@dhrrgn
dhrrgn / .gitconfig
Last active September 25, 2015 14:38
An awesome .gitconfig file with some niceties.
[user]
name = Your Name
email = your@email.com
[core]
autocrlf = input
[color]
status = auto
diff = auto
branch = auto
[alias]
# idéia original em php: http://goncin.wordpress.com/2010/06/21/ditados-populares-em-php/
###############
if tempo.is?(:chuvoso)
cavalinho.recolher
end
################