Skip to content

Instantly share code, notes, and snippets.

View alinzk's full-sized avatar
🇵🇰

Ali alinzk

🇵🇰
View GitHub Profile
@TheSharpieOne
TheSharpieOne / _print-grid-framwork.scss
Last active September 19, 2018 14:47
bootstrap v4 print columns (based on bootstrap v4's _grid-framework) (https://github.com/twbs/bootstrap/issues/16800#issuecomment-172406940)
// Framework print grid generation (for v4.0.0-beta.2)
//
// Used only to generate the correct number of grid classes given
// any value of `$grid-columns`.
// import bootstrap prior to this mixin to set the various variables and mixins needed/used.
@mixin make-print-grid-columns($columns: $grid-columns, $gutter: $grid-gutter-width, $name: "pr") {
@media print {
// Common properties
%grid-column-print {
@joshbuchea
joshbuchea / semantic-commit-messages.md
Last active June 29, 2024 16:03
Semantic Commit Messages

Semantic Commit Messages

See how a minor change to your commit message style can make you a better programmer.

Format: <type>(<scope>): <subject>

<scope> is optional

Example

@jhosteny
jhosteny / building-a-cqrs-web-application-in-elixir-using-phoenix.md
Last active January 15, 2022 22:43
Building a CQRS/ES web application in Elixir using Phoenix

Background

I've been interested in Command Query Responsibility Segregation and event sourcing since hearing Greg Young talk on the subject in early 2010. During the past seven years I've built an open-source Ruby CQRS library (rcqrs); worked professionally on .NET applications following the pattern; and more recently built an Event Store (eventstore) and CQRS library (commanded) in Elixir.

Building applications following domain-driven design and using CQRS feels really natural with the Elixir -- and Erlang -- actor model. An aggregate root fits well within an Elixir process, which are driven by immutable messages through their own message mailboxes, allowing them to run concurrently and in isolation.

The web application I built to implement these ideas in Elixir was [Segment Challen

@yefim
yefim / Dockerrun.aws.json
Last active April 7, 2023 16:11
Build a Docker image, push it to AWS EC2 Container Registry, then deploy it to AWS Elastic Beanstalk
{
"AWSEBDockerrunVersion": "1",
"Image": {
"Name": "<AWS_ACCOUNT_ID>.dkr.ecr.us-east-1.amazonaws.com/<NAME>:<TAG>",
"Update": "true"
},
"Ports": [
{
"ContainerPort": "443"
}
@metaphox
metaphox / terminwatch.py
Created April 15, 2012 23:28
watch shanghai german consulate termin
#!/usr/bin/env python
#-*- coding: utf-8 -*-#
import smtplib, time, urllib2
from bs4 import BeautifulSoup
from email.mime.text import MIMEText
def mailme(message):
msg = MIMEText(message)
msg['Subject'] = 'German Consu Termin!'
msg['From'] = 'fox@antares.metaphox.com'