Skip to content

Instantly share code, notes, and snippets.

View mekicha's full-sized avatar
🎯
Focusing

Emeka Icha mekicha

🎯
Focusing
  • Sennder GmbH
  • Germany
View GitHub Profile
@prologic
prologic / LearnGoIn5mins.md
Last active July 3, 2024 04:05
Learn Go in ~5mins
@leongjinqwen
leongjinqwen / upload-to-aws-flask.md
Created January 23, 2020 15:32
upload files to aws s3 bucket with flask

Upload files to AWS

Make sure you already have S3 bucket, access key and secret key before go through this notes.

How to connect to AWS?

Boto3 allows Python developers to write software that makes use of services like Amazon S3 and Amazon EC2.

Step 1: Install boto3 with pip

pip install boto3
@JoeyBurzynski
JoeyBurzynski / 55-bytes-of-css.md
Last active July 20, 2024 05:29
58 bytes of css to look great nearly everywhere

58 bytes of CSS to look great nearly everywhere

When making this website, i wanted a simple, reasonable way to make it look good on most displays. Not counting any minimization techniques, the following 58 bytes worked well for me:

main {
  max-width: 38rem;
  padding: 2rem;
  margin: auto;
}
@iliiliiliili
iliiliiliili / ubuntu-cli-install-and-run-avd.sh
Last active March 19, 2019 13:57
Install android-sdk for cli ubuntu and run android emulator as daemon for selected android API level
#!/bin/bash
#################################
# run from home directory #
#################################
#If you want to run it on GCP, you need to create nested-vm
#It will prompt you on Java instalation and avd creation
#You may need to run source ~/.bashrc after
@flutefreak7
flutefreak7 / jupyter_calendar.py
Last active January 18, 2024 06:59
Make an HTML calendar in a Notebook and highlight some days...
# intended for use in a Jupyter Notebook or similar.
import calendar
from calendar import HTMLCalendar
from IPython.display import HTML
# Based on https://stackoverflow.com/a/1458077/1639671
class HighlightedCalendar(HTMLCalendar):
def __init__(self, highlight=[], *args, **kwargs):
super().__init__(*args, **kwargs)
self._highlight = highlight
@verticalgrain
verticalgrain / app.js
Last active April 26, 2022 15:37
React Router V4 Redirect after form submission
import React, { Component } from 'react'
import { Redirect } from 'react-router'
export default class ContactForm extends Component {
constructor () {
super();
this.state = {
fireRedirect: false
}
}
@wojteklu
wojteklu / clean_code.md
Last active July 24, 2024 12:04
Summary of 'Clean code' by Robert C. Martin

Code is clean if it can be understood easily – by everyone on the team. Clean code can be read and enhanced by a developer other than its original author. With understandability comes readability, changeability, extensibility and maintainability.


General rules

  1. Follow standard conventions.
  2. Keep it simple stupid. Simpler is always better. Reduce complexity as much as possible.
  3. Boy scout rule. Leave the campground cleaner than you found it.
  4. Always find root cause. Always look for the root cause of a problem.

Design rules

@BeattieM
BeattieM / API Contract Example Spec.md
Last active June 28, 2024 04:43
An example of an API contract between the server and front-end devices

#Users

  • User object
{
  id: integer
  username: string
  email: string
  created_at: datetime(iso 8601)
  updated_at: datetime(iso 8601)
}
@ipmb
ipmb / ratelimit.nginxconf
Last active July 21, 2024 05:37
Nginx reverse proxy with rate limiting
upstream myapp {
server 127.0.0.1:8081;
}
limit_req_zone $binary_remote_addr zone=login:10m rate=1r/s;
server {
listen 443 ssl spdy;
server_name _;