This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
git config --global alias.lg "log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cd)%Creset %C(bold blue)<%an>%Creset' --date=relative" | |
git config --global alias.st status | |
git config --global alias.co checkout | |
git config --global alias.br "branch -vv" | |
git config --global alias.fa "fetch --all -p" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
composer install --ignore-platform-reqs |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Found it here: https://stackoverflow.com/questions/10067848/remove-folder-and-its-contents-from-git-githubs-history | |
# Saved this gist as some people really don't understand that you don't have to put node_modules in your bloody repository | |
git filter-branch --tree-filter 'rm -rf node_modules' --prune-empty HEAD | |
git for-each-ref --format="%(refname)" refs/original/ | xargs -n 1 git update-ref -d | |
echo node_modules/ >> .gitignore | |
git add .gitignore | |
git commit -m 'Removing node_modules from git history' | |
git gc | |
git push origin master --force |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sudo npm install electron -g --verbose --unsafe-perm=true |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
require 'vendor/autoload.php'; | |
use Namespace\For\Your\Package\Classname; | |
$a = new Classname(); | |
$b = $a->someMethod(); | |
?> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// When somebody fucked up the repo big time and the pre-hook fails without giving you an error, run this | |
git push --force --no-verify origin master | |
// or shorter | |
git push -f --no-verify origin master |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"version": "0.2.0", | |
"configurations": [ | |
{ | |
"name": "Listen for XDebug", | |
"type": "php", | |
"request": "launch", | |
"port": 9000, | |
"log": true, | |
"pathMappings": { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- | |
# found here https://stackoverflow.com/questions/35942247/how-to-move-placeholder-to-top-on-focus-and-while-typing | |
--> | |
<h1>The floating label</h1> | |
<div class="user-input-wrp"> | |
<br/> | |
<input type="text" class="inputText" required/> | |
<span class="floating-label">Your email address</span> | |
</div> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<h1>The floating label</h1> | |
<div class="input-wrapper"> | |
<input type="text" name="email" required/> | |
<label>Your email address</label> | |
</div> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import os | |
path = os.curdir | |
files = os.listdir(path) | |
for file in files: | |
if os.path.isfile(path + file): | |
filesize = os.path.getsize(path + file) | |
print(f'- {file} - {filesize} Bytes') | |
else: |