This file contains 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
// https://askubuntu.com/a/51953 | |
// If you want all new files in a particular directory to be owned by a particular group, just apply the setgid bit on it: | |
chmod -R 755 /some/dir | |
chgrp www-data /some/dir | |
chmod g+s /some/dir | |
// If you have an existing tree of directories that you want to apply this behaviour to, you can do so with find: |
This file contains 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 React from 'react'; | |
export default function App() { | |
const Form = ({ validationSchema, ...props }) => { | |
function recursiveMap(children, fn) { | |
return React.Children.map(children, child => { | |
if (!React.isValidElement(child)) { | |
return child; |
This file contains 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
[Desktop Entry] | |
Name=Spark | |
Version=2.7.7 | |
GenericName=Spark | |
X-GNOME-FullName=Spark | |
Comment=ignite realtime Spark IM client | |
Type=Application | |
Categories=Application;Utility; | |
Path=/opt/spark | |
Exec=/opt/spark/Spark |
This file contains 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
PROMPT_DIRTRIM=3 | |
parse_git_branch() { | |
git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/ (\1)/' | |
} | |
export PS1="\u@\h \[\033[32m\]\w\[\033[33m\]\$(parse_git_branch)\[\033[00m\]$ " |
This file contains 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
// https://askubuntu.com/a/51953 | |
// If you want all new files in a particular directory to be owned by a particular group, just apply the setgid bit on it: | |
chgrp www-data /some/dir | |
chmod g+s /some/dir | |
// If you have an existing tree of directories that you want to apply this behaviour to, you can do so with find: | |
find /some/dir -type d -exec chgrp www-data {} + |
This file contains 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
code --install-extension ms-vscode.sublime-keybindings | |
code --install-extension msjsdiag.debugger-for-chrome | |
code --install-extension PeterJausovec.vscode-docker | |
code --install-extension PKief.material-icon-theme | |
code --install-extension redhat.vscode-yaml | |
code --install-extension Shan.code-settings-sync | |
code --install-extension william-voyek.vscode-nginx |
This file contains 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 find . -name "node_modules" -type d -prune | xargs du -chs | |
sudo find . -name "node_modules" -type d -prune -exec rm -rf '{}' + |
This file contains 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
- Spark Chat | |
O spark a partir da versão 2.8 usa um protocolo de transferência de arquivo diferente, na porta 7777. Para funcionar basta baixar a versão 2.7.7 encontrada nesse link: https://github.com/igniterealtime/Spark/releases/tag/v2.7.7 | |
Baixe a versão .tar.gz, é requerido o java8 na máquina. Para instalar: | |
sudo add-apt-repository ppa:openjdk-r/ppa | |
sudo apt-get update | |
sudo apt-get install openjdk-8-jdk | |
tar -xvzf spark_2_7_7.tar.gz |
This file contains 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
## List folder sizes sorted asc | |
du -sh ./* | sort -h | |
## Remove folders/files based on .gitignore | |
for f in ./* ./**/* | |
do | |
if [ -d "$f" ] && [ -d "$f/.git" ] | |
then | |
echo "Directory $f" | |
git --git-dir $f/.git clean -Xdf -e !.env* -- $f |
OlderNewer