Skip to content

Instantly share code, notes, and snippets.

View ArchTaqi's full-sized avatar
🏠
Working from home

Muhammad Taqi ArchTaqi

🏠
Working from home
View GitHub Profile
@dylanroy
dylanroy / Sample Architecture Diagram
Last active April 2, 2024 15:01
Code snippets from Medium Blog Post Create Beautiful Architecture Diagrams with Python
from diagrams import Cluster, Diagram
from diagrams.gcp.analytics import BigQuery, Dataflow, PubSub
from diagrams.gcp.compute import AppEngine, Functions
from diagrams.gcp.database import BigTable
from diagrams.gcp.iot import IotCore
from diagrams.gcp.storage import GCS
with Diagram("Media Monitoring Storage Architecture", show=False) as med_diag:
pubsub = PubSub("pubsub")
flow = Dataflow("DataFlow")
@gene1wood
gene1wood / mysqlbackupforcrashplan.bash
Created July 24, 2018 15:11
Script that exports a MySQL database so it can be backed up
#!/bin/bash
#
# A script to create a daily mysqldump for crashplan
# Defaults
# Override them in /etc/default/mysqlbackupforcrashplan
OUTPUTFILE=/var/local/full-backup.sql
STATEFILE=/var/local/full-backup.sql.state
CRONFILE=/etc/cron.d/mysqlbackupforcrashplan
MYSQLDUMPBIN=/usr/bin/mysqldump
@charlieparkes
charlieparkes / setup_osx.sh
Last active November 20, 2019 12:09
Setup OSX Development Environment
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
brew install cask xquartz
brew install \
python3 \
pipenv \
pyenv \
vim \
mosh \
@vakila
vakila / LilLambda.ipynb
Last active January 27, 2023 05:51
Anjana Vakil, "Mary had a little lambda", OSCON 2018 (https://conferences.oreilly.com/oscon/oscon-or/public/schedule/detail/67384) & EuroPython 2017 (https://youtu.be/7BsfMMYvGaU)
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@kariae
kariae / .gitlab-ci.yml
Created June 6, 2017 17:29
GitLab CI/CD configuration for Symfony
variables:
REGISTRY_URL: registry.lekode.com:5000
IMAGE_NAME: app
BUILD_CODE_IMAGE: $REGISTRY_URL/$IMAGE_NAME:$CI_COMMIT_REF_NAME
LATEST_CODE_IMAGE: $REGISTRY_URL/$IMAGE_NAME:latest
stages:
- test
- install
- build
@nmfzone
nmfzone / domain.com
Created April 15, 2017 10:36
NginX SSL Config for Laravel/Lumen using Let's Encrypt
server {
listen 80;
listen [::]:80;
server_name domain.com;
# Redirect all HTTP requests to HTTPS with a 301 Moved Permanently response.
return 301 https://$host$request_uri;
}
@ziadoz
ziadoz / install.sh
Last active April 20, 2024 10:18
Install Chrome, ChromeDriver and Selenium on Ubuntu 16.04
#!/usr/bin/env bash
# https://developers.supportbee.com/blog/setting-up-cucumber-to-run-with-Chrome-on-Linux/
# https://gist.github.com/curtismcmullan/7be1a8c1c841a9d8db2c
# https://stackoverflow.com/questions/10792403/how-do-i-get-chrome-working-with-selenium-using-php-webdriver
# https://stackoverflow.com/questions/26133486/how-to-specify-binary-path-for-remote-chromedriver-in-codeception
# https://stackoverflow.com/questions/40262682/how-to-run-selenium-3-x-with-chrome-driver-through-terminal
# https://askubuntu.com/questions/760085/how-do-you-install-google-chrome-on-ubuntu-16-04
# Versions
CHROME_DRIVER_VERSION=`curl -sS https://chromedriver.storage.googleapis.com/LATEST_RELEASE`
@diegonobre
diegonobre / symfony3-rest-api.md
Last active January 5, 2024 14:36 — forked from tjamps/README.md
Basic RESTful API with Symfony 3 + FOSRestBundle (JSON format only) + FOSUserBundle + FOSOauthServerBundle

Basic RESTful API with Symfony 3 + FOSRestBundle (JSON format only) + FOSUserBundle + FOSOauthServerBundle

The API we are creating in this gist will follow these rules :

  • The API only returns JSON responses
  • All API routes require authenticationu
  • Authentication is handled via OAuth2 with password Grant Type only (no need for Authorization pages and such).
  • API versioning is managed via a subdomain (e.g. v1.api.example.com)

The API will be written in PHP with the Symfony 3 framework. The following SF2 bundles are used :

@vasanthk
vasanthk / System Design.md
Last active July 24, 2024 23:02
System Design Cheatsheet

System Design Cheatsheet

Picking the right architecture = Picking the right battles + Managing trade-offs

Basic Steps

  1. Clarify and agree on the scope of the system
  • User cases (description of sequences of events that, taken together, lead to a system doing something useful)
    • Who is going to use it?
    • How are they going to use it?