Skip to content

Instantly share code, notes, and snippets.

View nunomazer's full-sized avatar
🎯
Coding ... allways

Ademir Mazer Jr [ Nuno ] nunomazer

🎯
Coding ... allways
View GitHub Profile
@bertspaan
bertspaan / README.md
Created January 2, 2014 15:28
Python script to convert DBF database file to CSV
@ryansechrest
ryansechrest / php-style-guide.md
Last active April 29, 2025 16:54
PHP style guide with coding standards and best practices.

PHP Style Guide

All rules and guidelines in this document apply to PHP files unless otherwise noted. References to PHP/HTML files can be interpreted as files that primarily contain HTML, but use PHP for templating purposes.

The keywords "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in RFC 2119.

Most sections are broken up into two parts:

  1. Overview of all rules with a quick example
  2. Each rule called out with examples of do's and don'ts
@akuzemchak
akuzemchak / DeployCommand.php
Created July 8, 2013 17:20
Basic Laravel deployment script
<?php
// app/commands/DeployCommand.php
use Illuminate\Console\Command;
use Symfony\Component\Console\Input\InputOption;
use Symfony\Component\Console\Input\InputArgument;
class DeployCommand extends Command
{
@rclark
rclark / L.TopoJSON.js
Last active December 7, 2022 00:23
TopoJSON-aware Leaflet layer
/*
You'll need something like this in your HTML:
<script src="http://d3js.org/topojson.v1.min.js"></script>
*/
L.TopoJSON = L.GeoJSON.extend({
addData: function(jsonData) {
if (jsonData.type === "Topology") {
for (key in jsonData.objects) {
geojson = topojson.feature(jsonData, jsonData.objects[key]);
@nunomazer
nunomazer / linux-config-after-install.sh
Last active December 15, 2015 04:09
Customizations after installing Ubuntu / Mint
#!/bin/sh
cd ~/Downloads
# adding getdeb repository
#sudo add-apt-repository 'deb http://archive.getdeb.net/ubuntu precise-getdeb apps'
#sudo wget -q -O- http://archive.getdeb.net/getdeb-archive.key | sudo apt-key add -
# adding classic menu repository
#sudo add-apt-repository ppa:diesch/testing
@jednano
jednano / gitcom.md
Last active February 27, 2025 03:05
Common git commands in a day-to-day workflow

Git Cheat Sheet

Initial Setup

Create an empty git repo or reinitialize an existing one

git init
@hakre
hakre / simplexml-import.php
Created February 12, 2013 11:23
In SimpleXML, how can I add an existing SimpleXMLElement as a child element?
<?php
/**
* In SimpleXML, how can I add an existing SimpleXMLElement as a child element?
*
* @link http://stackoverflow.com/q/767327/367456
* @link http://eval.in/9568
* @link http://3v4l.org/1sI05
*/
/**
@mindplay-dk
mindplay-dk / README.md
Last active September 3, 2024 11:39
ISO 3166-2 Country and State/Region Tables for MySQL
.fc {
direction: ltr;
text-align: left; }
.fc table {
border-collapse: collapse;
border-spacing: 0; }
.fc .btn {
line-height: 1.2em; }
html .fc {
@netojoaobatista
netojoaobatista / Date.prototype.diff.js
Created April 26, 2012 20:09
Returns the difference between two Date objects.
Object.defineProperty(Date.prototype,"diff",{
writable: false, configurable: false, enumerable: true,
/**
* Returns the difference between two Date objects.
* @param {Date} The date to compare to.
* @return {Object}
* @throws {TypeError}
*/
value: function(date) {