Skip to content

Instantly share code, notes, and snippets.

View delubyo's full-sized avatar

Albert Rosete delubyo

  • Code and Theory
  • Manila
View GitHub Profile
@delubyo
delubyo / Change "origin" of your GIT repository
Last active November 6, 2018 13:26 — forked from DianaEromosele/Change "origin" of your GIT repository
Change "origin" of your GIT repository
$ git remote rm origin
$ git remote add origin [email protected]:aplikacjainfo/proj1.git
$ git config master.remote origin
$ git config master.merge refs/heads/master
$ git branch --set-upstream-to=origin/master master
$ git fetch --progress --prune --recurse-submodules=no origin
$ git rebase --preserve-merges --onto origin/master <last_hash_code> master
General
1. Site uses a cache buster for expiring .js, .css, and images
2. JavaScript and CSS is minified and concatenated into logical groupings
3. Images have been optimized by ImageOptim (http://imageoptim.com/)
Markup
1. Code does not contain inline JavaScript event listeners
@delubyo
delubyo / revert-a-commit.md
Created August 22, 2018 09:52 — forked from gunjanpatel/revert-a-commit.md
Git HowTo: revert a commit already pushed to a remote repository

Revert the full commit

Sometimes you may want to undo a whole commit with all changes. Instead of going through all the changes manually, you can simply tell git to revert a commit, which does not even have to be the last one. Reverting a commit means to create a new commit that undoes all changes that were made in the bad commit. Just like above, the bad commit remains there, but it no longer affects the the current master and any future commits on top of it.

git revert {commit_id}'

About History Rewriting

Delete the last commit

Deleting the last commit is the easiest case. Let's say we have a remote origin with branch master that currently points to commit dd61ab32. We want to remove the top commit. Translated to git terminology, we want to force the master branch of the origin remote repository to the parent of dd61ab32:

@delubyo
delubyo / ci_style_guide.md
Created August 17, 2018 10:42 — forked from fideloper/ci_style_guide.md
CodeIgniter Style Guide

CodeIgniter Style Guide

This is collectively being called a style guide, however it serves as a standard to enforce a stricter and more enforced methodology in how programming should be done in CodeIgniter.

Why

CodeIgniter is powerful. CodeIgniter is hugely popular. It's popular because it's easy. It's easy because there are many ways to accomplish a task.

CodeIgniter is terrible for the exact reasons which make it powerful. You can too easily place code in a confusing place, or not separate concerns, thus creating programming challenges down the line. It's noob-friendly, which means it's inherently easy to make noob mistakes.

This document serves to restrict coding practices within CodeIgniter with the purpose of making an application with more class (pun without-a-doubt, most-strongly intended).

<?xml version="1.0" encoding="utf-8"?>
<!-- Generator: Adobe Illustrator 21.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
viewBox="0 0 735.8 295.6" enable-background="new 0 0 735.8 295.6" xml:space="preserve">
<g>
<path fill="#FFFFFF" d="M200.2,178.3c-1.4-5.2-6.1-9.7-11.4-9c-1.2,0.2-2.5,0.7-3.7,1.6l-0.3,0.3c-1.4,3.3-4.2,6.3-4.2,10.5
c0,0.1,0,0.3,0,0.5c0.3,1.6,1.3,3.1,1.5,4.3c0,0.1,0,0.1,0,0.2c0.6,5.2-2.8,14.5-4.3,21.4c-1.7,7.9-4,15.1-5.4,21.4
c-0.8,3.4-1.1,7.9-0.5,11.5c0.2,1.3,0.5,2.4,1,3.4l0.4,0.4c3.8,1.4,7.2,8.2,12.6,7.5l0,0c1.3-0.2,2.6-0.9,3.9-2.1
c0.2-0.2,0.3-0.4,0.2-0.7c-2.1-15.7,1.6-25.8,5.1-39.8c1.2-4.6,2-10,3.1-15.2c1.1-5.3,2.8-10.8,2.1-15.3
C200.4,179,200.3,178.7,200.2,178.3z"/>
@delubyo
delubyo / 0_reuse_code.js
Created January 16, 2017 07:58
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console