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
-- To list all the builtin exceptions: | |
SELECT * | |
FROM all_source | |
WHERE name = 'STANDARD' | |
AND upper(text) like '%EXCEPTION%'; | |
/ | |
-- To list all the builtin exception codes: | |
DECLARE |
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
# Add the remote, call it "upstream": | |
git remote add upstream https://github.com/whoever/whatever.git | |
# Fetch all the branches of that remote into remote-tracking branches, | |
# such as upstream/master: | |
git fetch upstream | |
# Make sure that you're on your master branch: |
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
ffmpeg -i movie.mp4 -ss 00:00:03 -t 00:00:08 -async 1 cut.mp4 |
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 configured routes (for debugging purposes) | |
app._router.stack.forEach((r) => { | |
if (r.route && r.route.path) { | |
console.log(r.route.path); | |
} | |
}); |
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
# Generating | |
pacman -Qe | awk '{print $1}' > package_list.txt | |
# Installing | |
for x in $(cat package_list.txt); do pacman -S $x; done | |
# This will also work, but Pacman will exit if you have a package | |
# installed that is not in the repositories. | |
pacman -S `cat package_list.txt` |
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
convert page.png page.pdf | |
convert page*.png mydoc.pdf | |
# To avoid generating huge PDF files, use something like | |
convert -compress jpeg -quality 85 *.png out.pdf |
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 | |
# | |
# Createss a swap file and activates it | |
# Jon Ribeiro <contact@jonathas.com> - 20170503 | |
# | |
SWAPFILE="/var/local/swapfile" | |
SWAPFILE_SIZE=2048576 #2GB | |
dd if=/dev/zero of=$SWAPFILE bs=1024 count=$SWAPFILE_SIZE |
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 | |
sudo modprobe vboxdrv | |
sudo modprobe vboxnetflt |
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
-----BEGIN PGP PUBLIC KEY BLOCK----- | |
mQINBFnlCn0BEADhjvKRhCG4EebLmBl7Bg7VBz0lR8hGdF7g4sSaDbe4D0hnEWb6 | |
6b8Cdy0WhzvHzvMsesfdQoqwcRz9oFrpVGFidpLJjJS7Bn52aqzS1kPPQAFhF8No | |
+wNayjrJsugr48IyiV7sl6sajlnDqwFRIodz0U0yarLwL7cweQvwVv1D1ahW/1Je | |
tlROsUtosu9m6YBwgnoekGJoiAmibwAl9UB6XZt5lb9vg3UzetAXA7fkl05WoZ2q | |
6AiFyinUWOKHLJW9Ah6JjFIWWWyuUOw3lcp+rk3E4sBmyYzZG/9nC6UyvntQUdbk | |
Pc1qwBt5eKo3QhSuZI05ai/m8pBHYUiv9c52swt+Hw2K/V4CMmWQBQTa0kTQ9mYY | |
GS5OOXcNy7WVHyeFBcFZkwUYVP74AjDGYNJscfkayCLRPV7MCgbHtYQ4U4pfBxPt | |
ffsqf5R9RyBw/J0vEeKwtFIUHV7VXJO4w36J1Vakq0H4SFiL52yLyUaDwLhn5v3d |
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
// sending to sender-client only | |
socket.emit('message', "this is a test"); | |
// sending to all clients, include sender | |
io.emit('message', "this is a test"); | |
// sending to all clients except sender | |
socket.broadcast.emit('message', "this is a test"); | |
// sending to all clients in 'game' room(channel) except sender |
OlderNewer