Skip to content

Instantly share code, notes, and snippets.

@AwsGeek
AwsGeek / bucket.json
Created December 23, 2018 20:17
Setting up a Static Website on S3
{
"Version":"2012-10-17",
"Statement":[{
"Sid":"PublicReadForGetBucketObjects",
"Effect":"Allow",
"Principal": "*",
"Action":["s3:GetObject"],
"Resource":["arn:aws:s3:::www.aws-today.com/*"]
}]
}
@nzakas
nzakas / techleadbook.md
Created March 20, 2018 20:44
Tech Lead Book

Tech Lead Book

  1. Introduction
  2. What is a Tech Lead?
  3. The Tech Lead Mindset
  4. Becoming a Tech Lead
  5. Working Cross-Functionally
  6. The Art of Delegation
  7. Technical Best Practices
  8. Effective Decision Making
@faniska
faniska / wkhtmltopdf.sh
Last active March 11, 2024 11:51
Install wkhtmltopdf with patched QT on Ubuntu Linux
# Uncomment the next line if you have installed wkhtmltopdf
# sudo apt remove wkhtmltopdf
cd ~
# Select an appropriate link for your system (32 or 64 bit) from the page https://wkhtmltopdf.org/downloads.html and past to the next line
wget https://github.com/wkhtmltopdf/wkhtmltopdf/releases/download/0.12.4/wkhtmltox-0.12.4_linux-generic-amd64.tar.xz
tar xvf wkhtmltox*.tar.xz
sudo mv wkhtmltox/bin/wkhtmlto* /usr/bin
sudo apt-get install -y openssl build-essential libssl-dev libxrender-dev git-core libx11-dev libxext-dev libfontconfig1-dev libfreetype6-dev fontconfig
@iamareebjamal
iamareebjamal / GSoC2017_Report_iamareebjamal.md
Last active March 28, 2019 12:21
Final Project Report for GSoC 2017 - iamareebjamal

GSoC 2017 Open Event Orga App, Areeb Jamal - FOSSASIA

This GSoC, I worked on Open Event Orga App where we created Android client for the Open Event Orga API for event management. The app allows organizers to sign up and log in, view sale analytics, scan QR code and check in attendees, manage and create tickets.

The app also contains following features:

  • Sales overview with graphs
  • More fluent QR scan workflow
  • Background job scheduling for offline support
  • Event and Organizer Info
  • Uniform and modern material look
@pandafulmanda
pandafulmanda / Python3 Virtualenv Setup.md
Last active March 12, 2024 15:59 — forked from akszydelko/Python3 Virtualenv Setup.md
Setting up and using Python3 Virtualenv on Mac

Python3 Virtualenv Setup

Requirements
  • Python 3
  • Pip 3
$ brew install python3
@alex-shpak
alex-shpak / Interceptor.java
Last active March 29, 2023 21:06
Refreshing OAuth token with okhttp interceptors. All requests will wait until token refresh finished, and then will continue with the new token.
private class HttpInterceptor implements Interceptor {
@Override
public Response intercept(Chain chain) throws IOException {
Request request = chain.request();
//Build new request
Request.Builder builder = request.newBuilder();
builder.header("Accept", "application/json"); //if necessary, say to consume JSON
@andreagrandi
andreagrandi / settings.py
Last active November 25, 2023 14:36
Sending emails from Django during development without using a real SMTP server. Python comes with a very basic and integrated SMTP server. To start it just open a terminal and type: python -m smtpd -n -c DebuggingServer localhost:1025 Then configure your settings.py using the following parameters. You will see the email directly in the terminal …
if DEBUG:
EMAIL_HOST = 'localhost'
EMAIL_PORT = 1025
EMAIL_HOST_USER = ''
EMAIL_HOST_PASSWORD = ''
EMAIL_USE_TLS = False
DEFAULT_FROM_EMAIL = 'testing@example.com'
@jackiekazil
jackiekazil / rounding_decimals.md
Last active January 17, 2024 12:29
How do I round to 2 decimals in python?

How do I round to 2 decimals?

In python, you have floats and decimals that can be rounded. If you care about the accuracy of rounding, use decimal type. If you use floats, you will have issues with accuracy.

All the examples use demical types, except for the original value, which is automatically casted as a float.

To set the context of what we are working with, let's start with an original value.

Original Value