Skip to content

Instantly share code, notes, and snippets.

View nmicht's full-sized avatar

Michelle Torres nmicht

View GitHub Profile
@nmicht
nmicht / .htaccess
Last active February 17, 2019 22:00
Apache htaccess to list files with a beauty format
# ENABLE DIRECTORY
# Docs: https://httpd.apache.org/docs/2.4/mod/mod_autoindex.html
Options +Indexes
IndexOptions IgnoreCase FancyIndexing FoldersFirst HTMLTable NameWidth=* SuppressHTMLPreamble ScanHTMLTitles SuppressLastModified DescriptionWidth=*
# SPECIFY HEADER FILE
HeaderName /header.html
# SPECIFY FOOTER FILE
ReadmeName /footer.html
@nmicht
nmicht / emoticons.md
Last active January 10, 2019 17:18 — forked from rxaviers/gist:7360908
Lista completa de emoticons para github markdown

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:
@nmicht
nmicht / atom-packages
Last active January 8, 2019 22:42
Atom packages
apm install docblockr
apm install atom-wrap-in-tag
apm install php-cs-fixer
apm install goto-definition
apm install todo-show
apm install editorconfig
apm install atom-beautify
apm install aligner
apm install linter-python-pep8
@nmicht
nmicht / tic-tac-toe.php
Created December 19, 2018 19:59
A Tic-Tac-Toe game for any square board and any number of players
<?php
class TicTacToe {
/**
* Board for the game
* @var array
*/
private $board = [];
/**
@nmicht
nmicht / mogrify
Last active December 17, 2018 21:39
Mogrify to add brand on photos
mogrify -path ./branded -format png -draw 'image over 400,2200 1850,203.34 "./logo.png"' *
@nmicht
nmicht / latency.txt
Created June 21, 2018 13:21 — forked from jboner/latency.txt
Latency Numbers Every Programmer Should Know
Latency Comparison Numbers (~2012)
----------------------------------
L1 cache reference 0.5 ns
Branch mispredict 5 ns
L2 cache reference 7 ns 14x L1 cache
Mutex lock/unlock 25 ns
Main memory reference 100 ns 20x L2 cache, 200x L1 cache
Compress 1K bytes with Zippy 3,000 ns 3 us
Send 1K bytes over 1 Gbps network 10,000 ns 10 us
Read 4K randomly from SSD* 150,000 ns 150 us ~1GB/sec SSD
@nmicht
nmicht / upgrade_mysql.sh
Created March 9, 2017 22:03
Upgrade MySQL without prompt
#!/usr/bin/env bash
wget http://dev.mysql.com/get/mysql-apt-config_0.8.2-1_all.deb
debconf-set-selections <<< 'mysql-apt-config mysql-apt-config/select-tools select MySQL Server (Currently selected: mysql-5.7)'
debconf-set-selections <<< "mysql-apt-config mysql-apt-config/select-preview select mysql-5.7"
debconf-set-selections <<< "mysql-apt-config mysql-apt-config/select-server select mysql-5.7"
debconf-set-selections <<< "mysql-apt-config mysql-apt-config/select-product select Ok"
debconf-set-selections <<< 'mysql-server mysql-server/root_password password root'
debconf-set-selections <<< 'mysql-server mysql-server/root_password_again password root'
@nmicht
nmicht / squash.sh
Last active March 21, 2018 05:04 — forked from richistron/squash.sh
#! /bin/bash
# move to your local branch
git checkout local_branch
# pull the remotes
git fetch --all
# merge and squash
git merge origin/dirty_branch --squash
@nmicht
nmicht / README.md
Last active January 26, 2018 18:41
Script to checkout a list of "repos" to certain branch, pull changes and run grunt.

Checkout, pull and run grunt

  1. Copy this bash into your /usr/local/bin folder
  2. Assign execution permissions
  3. Create another file named repos.txt
  4. In repos.txt list with full path each of the repos you want to be part
  5. Update the bash with the full path to your repos.txt file
@nmicht
nmicht / android
Created September 16, 2017 17:10
build.gradle
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
repositories {
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:2.2.+'
// NOTE: Do not place your application dependencies here; they belong