$ keytool -genkey -v -keystore debug.keystore -storepass android -alias androiddebugkey -keypass android -keyalg RSA -keysize 2048 -validity 10000 -dname "C=US, O=Android, CN=Android Debug"
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
-- Get Max ID from table | |
SELECT MAX(id) FROM table; | |
-- Get Next ID from table | |
SELECT nextval('table_id_seq'); | |
-- Set Next ID Value to MAX ID | |
SELECT setval('table_id_seq', (SELECT MAX(id) FROM table)); |
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 /var/lib/caddy/.local/share/caddy/certificates -type f -exec rm {} \; | |
sudo systemctl restart caddy |
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
# curl - Raw upload | |
curl -X PUT -T image.png https://example.com/upload | |
# curl - Content-Type: multipart/form-data | |
curl -F name=logo -F file=@image.png https://example.org/upload | |
# curl - POST presigned URL (S3) |
CSPRNG (Cryptographically Secure Pseudo-Random Number Generator) functions:
os.urandom(n)
: return a string of n random bytes.random.SystemRandom()
: provides random functions that usesos.urandom()
.
Note: Don't use random
module for PRNG for security purposes.
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
ROM ruby:2.2.3 | |
RUN apt-get update -qq && apt-get install -y build-essential | |
RUN apt-get install -y libpq-dev | |
RUN apt-get install -y ghostscript | |
RUN mkdir /app | |
WORKDIR /app |
NewerOlder