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
#!/bin/bash | |
echo "$(git ls-files | xargs cat | wc -l | xargs) Lines of code" | |
RESULT=$(wc -l $(git ls-files) | grep .php | grep -v "tests/" | awk '{ if ( $1 > 250 ) printf("%-6s | %s \n\r", $1, $2) }') | |
if [ -n "$RESULT" ]; then | |
awk 'BEGIN {s=sprintf("%131s","");gsub(/ /,"-",s);print s}' | |
echo "LINE | FILE" | |
awk 'BEGIN {s=sprintf("%131s","");gsub(/ /,"-",s);print s}' | |
echo $RESULT | |
awk 'BEGIN {s=sprintf("%131s","");gsub(/ /,"-",s);print s}' |
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
$('iframe').remove(); | |
el=document.getElementById('c37'); | |
el.removeEventListener('contextmenu', getEventListeners(el).contextmenu[0].listener); |
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 | |
class Email | |
{ | |
private string $email; | |
public function __construct(string $email) | |
{ | |
if (false === filter_var($email, FILTER_VALIDATE_EMAIL)) { | |
throw new Exception('Invalid Email'); |
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 | |
class BaseController | |
{ | |
public function __contruct(Foo $foo) | |
{ | |
$this->foo = $foo; | |
} | |
} |
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 | |
/** | |
* @Route('/users', methods={'POST'}) | |
*/ | |
class RegisterUserController | |
{ | |
private RegisterUserService $service; | |
public function __construct(RegisterUserService $service) |
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 | |
/** | |
* @Route('/users', methods={'POST'}) | |
*/ | |
class RegisterUserController | |
{ | |
private RegisterUserService $service; | |
public function __construct(RegisterUserService $service) { ... } |
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
#set( $nameparts = $NAME.split("_")) | |
#set( $namepart = '') | |
#set( $classname = '') | |
#foreach( $namepart in $nameparts ) | |
#set( $classname = $classname + $namepart.substring(0, 1).toUpperCase() + $namepart.substring(1)) | |
#end | |
class $classname { | |
$classname(); | |
} |
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
# ~/.bashrc: executed by bash(1) for non-login shells. | |
# see /usr/share/doc/bash/examples/startup-files (in the package bash-doc) | |
# for examples | |
# If not running interactively, don't do anything | |
[ -z "$PS1" ] && return | |
# don't put duplicate lines in the history. See bash(1) for more options | |
# ... or force ignoredups and ignorespace | |
HISTCONTROL=ignoredups:ignorespace |
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
# Added zsh shell. | |
sudo apt-get install zsh -y | |
wget --no-check-certificate https://github.com/robbyrussell/oh-my-zsh/raw/master/tools/install.sh -O - | sh | |
sudo chsh -s /bin/zsh vagrant && sed -i 's/ZSH_THEME="robbyrussell"/ZSH_THEME="af-magic"/g' ~/.zshrc && echo "alias ll=\"ls -lha\"" >> ~/.zshrc && zsh | |
# disable git when needed | |
git config --global oh-my-zsh.hide-status 1 | |
# autosuggestions | |
git clone https://github.com/zsh-users/zsh-autosuggestions ~/.zsh/zsh-autosuggestions && echo "source ~/.zsh/zsh-autosuggestions/zsh-autosuggestions.zsh" >> ~/.zshrc && source ~/.zshrc |
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
# Added zsh shell. | |
sudo apt-get install zsh -y | |
wget --no-check-certificate https://github.com/robbyrussell/oh-my-zsh/raw/master/tools/install.sh -O - | sh | |
sudo chsh -s /bin/zsh vagrant && sed -i 's/ZSH_THEME="robbyrussell"/ZSH_THEME="af-magic"/g' ~/.zshrc && echo "alias ll=\"ls -lha\"" >> ~/.zshrc && zsh | |
# autosuggestions | |
git clone https://github.com/zsh-users/zsh-autosuggestions ~/.zsh/zsh-autosuggestions && echo "source ~/.zsh/zsh-autosuggestions/zsh-autosuggestions.zsh" >> ~/.zshrc && source ~/.zshrc |
NewerOlder