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
Show hidden characters
{ | |
"$schema": "https://aka.ms/terminal-profiles-schema", | |
// Add custom actions and keybindings to this array. | |
// To unbind a key combination from your defaults.json, set the command to "unbound". | |
// To learn more about actions and keybindings, visit https://aka.ms/terminal-keybindings | |
"actions": | |
[ | |
// Copy and paste are bound to Ctrl+Shift+C and Ctrl+Shift+V in your defaults.json. | |
// These two lines additionally bind them to Ctrl+C and Ctrl+V. | |
// To learn more about selection, visit https://aka.ms/terminal-selection |
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 org.apache.commons.codec.binary.Base64 | |
import org.apache.commons.compress.compressors.gzip.GzipCompressorInputStream | |
import org.apache.commons.io.IOUtils | |
import javax.crypto.Cipher | |
import javax.crypto.CipherInputStream | |
import javax.crypto.NoSuchPaddingException | |
import javax.crypto.spec.IvParameterSpec | |
import javax.crypto.spec.SecretKeySpec | |
import java.nio.charset.StandardCharsets |
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
docker run \ | |
-it --rm --user "$(id -u):$(id -g)" \ | |
-v "$PWD":/usr/src/app -w /usr/src/app rails \ | |
rails new mastership -d=postgresql -T --webpack=react \ | |
--skip-coffee --skip-bundle --skip-turbolinks --skip-spring | |
docker run \ | |
-it --rm --user "$(id -u):$(id -g)" \ | |
-v "$PWD":/usr/src/app -w /usr/src/app rails \ | |
rails new . --api -T --skip-bundle |
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
FROM tomcat:9.0 | |
RUN mv webapps webapps.bk | |
RUN mv webapps.dist/ webapps | |
COPY /tomcat-users.xml /usr/local/tomcat/conf/ | |
COPY /context.xml /usr/local/tomcat/webapps/manager/META-INF/ | |
CMD ["catalina.sh", "run"] |
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 heroku container:pull <SERVICE> --app <APPNAME>` - pull container | |
+ `sudo heroku container:rm <SERVICE> --app <APPNAME>` - remove service | |
+ `sudo heroku container:push <SERVICE> --recursive --app <APPNAME>` - build and push multiple services | |
+ `sudo heroku container:release <SERVICE> --app <APPNAME>` - enable heroku service |
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
git branch -r | grep -v '\->' | while read remote; do git branch --track "${remote#origin/}" "$remote"; done | |
git fetch --all | |
git pull --all |
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
repos=(repo1 repo2 repo3 etc) | |
for i in "${repos[@]}";do curl -X PATCH -H "Authorization: token YOURTOKEN" https://api.github.com/repos/YOURUSERNAME/$i -d '{"private":true}';done |
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
git rm --cache docker-compose.yml |
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
#!/bin/bash | |
for DIRNAME in $(find ./ -type d) | |
do | |
mv $DIRNAME $(echo $DIRNAME | sed -E 's/FIND/REPLACE/') | |
done |
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
#!/bin/bash | |
curl -u "$1" https://api.github.com/user/repos -d "{\"name\":\"$2\"}" | |
git init | |
git remote add origin "https://github.com/$1/$2.git" | |
touch README.md | |
echo 'cli-push-remote-repo.sh' >> .gitignore | |
echo '.gitignore' >> .gitignore |
NewerOlder