Skip to content

Instantly share code, notes, and snippets.

View viniciusgati's full-sized avatar
🤕
alguém me salva

Vinicius Gati viniciusgati

🤕
alguém me salva
View GitHub Profile
@taq
taq / gist:5699377
Created June 3, 2013 16:28
Stupid PHP static variables behaviour
<?php
class A {
public static $name = null;
}
A::$name = "a";
class B extends A {
}
B::$name = "b";
@CrookedNumber
CrookedNumber / gist:8964442
Created February 12, 2014 21:02
git: Removing the last commit

Removing the last commit

To remove the last commit from git, you can simply run git reset --hard HEAD^ If you are removing multiple commits from the top, you can run git reset --hard HEAD~2 to remove the last two commits. You can increase the number to remove even more commits.

If you want to "uncommit" the commits, but keep the changes around for reworking, remove the "--hard": git reset HEAD^ which will evict the commits from the branch and from the index, but leave the working tree around.

If you want to save the commits on a new branch name, then run git branch newbranchname before doing the git reset.

@caridy
caridy / export-syntax.js
Last active January 15, 2022 14:22
ES6 Module Syntax Table
// default exports
export default 42;
export default {};
export default [];
export default foo;
export default function () {}
export default class {}
export default function foo () {}
export default class foo {}
@alexishida
alexishida / rails-oracle-client-18-linux.txt
Last active February 27, 2023 00:19
Rails Oracle Client 18 Linux
# Instalar a biblioteca
sudo apt-get install libaio1
# Criar a pasta
sudo mkdir /opt/oracle
# Extrair para /opt/oracle
instantclient-basic-linux.x64-18.5.0.0.0dbru.zip
instantclient-sdk-linux.x64-18.5.0.0.0dbru.zip