Skip to content

Instantly share code, notes, and snippets.

Avatar
💭
Coding... 👽👾💻🕹

Sergio Brito yacafx

💭
Coding... 👽👾💻🕹
View GitHub Profile
@yacafx
yacafx / git-mv-with-history
Created Apr 16, 2021 — forked from emiller/git-mv-with-history
git utility to move/rename file or folder and retain history with it.
View git-mv-with-history
#!/bin/bash
#
# git-mv-with-history -- move/rename file or folder, with history.
#
# Moving a file in git doesn't track history, so the purpose of this
# utility is best explained from the kernel wiki:
#
# Git has a rename command git mv, but that is just for convenience.
# The effect is indistinguishable from removing the file and adding another
# with different name and the same content.
@yacafx
yacafx / Instructions.sh
Created Aug 27, 2018 — forked from GhazanfarMir/Instructions.sh
Install PHP7.2 NGINX and PHP7.2-FPM on Ubuntu 16.04
View Instructions.sh
########## Install NGINX ##############
# Install software-properties-common package to give us add-apt-repository package
sudo apt-get install -y software-properties-common
# Install latest nginx version from community maintained ppa
sudo add-apt-repository ppa:nginx/stable
# Update packages after adding ppa
@yacafx
yacafx / settings.json
Last active Aug 5, 2018
Configuration for VS Code
View settings.json
{
"workbench.iconTheme": "vscode-icons",
"workbench.colorTheme": "Cobalt2",
"workbench.startupEditor": "none",
"editor.minimap.enabled": false,
"editor.formatOnSave": true,
"editor.fontSize": 18,
"editor.fontLigatures": true,
"editor.lineHeight": 25,
"editor.letterSpacing": 0.5,
@yacafx
yacafx / vscode_extensions.sh
Last active Aug 28, 2018
Basic extensions for VS Code
View vscode_extensions.sh
code --install-extension 2gua.rainbow-brackets
code --install-extension aaron-bond.better-comments
code --install-extension abusaidm.html-snippets
code --install-extension Angular.ng-template
code --install-extension anseki.vscode-color
code --install-extension BriteSnow.vscode-toggle-quotes
code --install-extension christian-kohler.npm-intellisense
code --install-extension christian-kohler.path-intellisense
code --install-extension cmstead.jsrefactor
code --install-extension CoenraadS.bracket-pair-colorizer
@yacafx
yacafx / testng.fish
Last active Mar 15, 2018
Fish function for test angular app with appshell
View testng.fish
function testng
ng build --prod
http-server -c-1 -p 4200 ./dist
end
@yacafx
yacafx / checkUserAgent.js
Created Mar 9, 2018
Check user agent in JS
View checkUserAgent.js
// Check if user agent is from Apple
if(/iPad|iPhone|iPod/.test(navigator.userAgent)){
// actions
} else {
// Maybe is Android ;)
}
View tablas.html
<h1>Poetry Workshops</h1>
<p>We will be conducting a number of poetry workshops and symposiums throughout the year.</p>
<p>Please note that the following events are free to members:</p>
<ul>
<li>A Poetic Perspective</li>
<li>Walt Whitman at War</li>
<li>Found Poems and Outsider Poetry</li>
</ul>
<table>
<tr>
@yacafx
yacafx / orderby.pipe.ts
Created Jan 3, 2018
Order by text or number for angular
View orderby.pipe.ts
import { Pipe, PipeTransform } from '@angular/core';
@Pipe({ name: 'orderBy' })
export class OrderBy implements PipeTransform {
transform(array, orderBy, asc = true) {
if (!orderBy || orderBy.trim() == "") {
return array;
}
@yacafx
yacafx / TopoJSON simplify.md
Last active Nov 18, 2017 — forked from frogcat/20170714.md
TopoJSON simplify demo
View TopoJSON simplify.md

TopoJSON simplify demo

@yacafx
yacafx / http.conf
Created Nov 3, 2017
Apache configuration
View http.conf
# ----------------------------------------------------------------------
# Apache configuration file
# This file is best used in /apache2/httpd.conf, not use in .htaccess because works slower.
#
# Rules takes from:
# - HTML5BoilerPlate: https://github.com/h5bp/html5-boilerplate/
# - W3 Edge: http://www.w3-edge.com/
# - Yahoo! Best Practices: http://developer.yahoo.com/performance/rules.html
# - Caching Tutorial: http://www.mnot.net/cache_docs/
# ----------------------------------------------------------------------