Skip to content

Instantly share code, notes, and snippets.

View ashkanRmk's full-sized avatar
:octocat:
Doing what makes me happy!

Ashkan Rahmani ashkanRmk

:octocat:
Doing what makes me happy!
View GitHub Profile
@linusyang
linusyang / dfa.py
Created April 9, 2013 17:35
A simple NFA to DFA converter
#!/usr/bin/env python
#
# By Linus Yang <laokongzi@gmail.com>
# Written on iPad using Textastic Code Editor
# Licensed under GPL v3
#
'''
Function:
Transform an NFA to DFA then simplify it
@domenic
domenic / 0-github-actions.md
Last active May 26, 2024 07:43
Auto-deploying built products to gh-pages with Travis

Auto-deploying built products to gh-pages with GitHub Actions

This is a set up for projects which want to check in only their source files, but have their gh-pages branch automatically updated with some compiled output every time they push.

A file below this one contains the steps for doing this with Travis CI. However, these days I recommend GitHub Actions, for the following reasons:

  • It is much easier and requires less steps, because you are already authenticated with GitHub, so you don't need to share secret keys across services like you do when coordinate Travis CI and GitHub.
  • It is free, with no quotas.
  • Anecdotally, builds are much faster with GitHub Actions than with Travis CI, especially in terms of time spent waiting for a builder.
@parmentf
parmentf / GitCommitEmoji.md
Last active July 17, 2024 01:20
Git Commit message Emoji
@kuznero
kuznero / docker-clean.md
Last active April 1, 2023 12:28
Cleanup docker images and containers after failed builds

Cleanup docker images and containers after failed builds

Sometimes, there are some untagged images left behind after failed builds. In order to get rid of those, this script can be used.

#!/bin/bash
docker rm $(docker ps -aq)
docker rmi $(docker images | grep "^<none>" | awk '{print $3}')
@psanford
psanford / meraki_strongswan_notes.md
Last active May 16, 2024 10:28
connect to meraki client vpn from strongswan (ubuntu 16.04 edition)

These are my notes for connecting to a meraki client vpn from ubuntu 16.04. This configuration assumes you are using a psk for the ipsec auth.

Install the following packages:

apt-get install -y strongswan xl2tpd

Configure strong swan

@aidin36
aidin36 / rename-by-date.py
Last active July 18, 2020 14:16
Renames JPEG files to the date and time it's taken.
# This work is published under CC0 (https://creativecommons.org/publicdomain/zero/1.0/)
# To the extent possible under law, Aidin Gharibnavaz (http://www.aidinhut.com) has waived
# all copyright and related or neighboring rights to this work.
import sys
import os
try:
import exifread
except ImportError:
@nerandell
nerandell / code-review-checklist.md
Last active May 21, 2024 17:43
PHP Code Review Guidelines

Make sure these boxes are checked before submitting/approving the PR

General

  • The code works
  • The code is easy to understand
  • Follows coding conventions
  • Names are simple and if possible short
  • Names are spelt correctly
  • Names contain units where applicable
  • There are no usages of magic numbers
@Prototype-X
Prototype-X / Install_pgAdmin4_with_python3_on_Ubuntu 16.04.md
Last active January 30, 2022 23:24
Install pgAdmin4 v2.0 with python3 on Ubuntu 16.04 DESKTOP mode

Install pgAdmin4 v2.0 with python3 on Ubuntu 16.04 DESKTOP mode

  1. Get Python Wheel pgAdmin4

     wget https://ftp.postgresql.org/pub/pgadmin/pgadmin4/v2.0/pip/pgadmin4-2.0-py2.py3-none-any.whl
    
  2. Install pip3

     sudo apt install python3-pip
    
@zerda
zerda / .gitlab-ci.yml
Last active August 8, 2023 07:52
Gitlab CI for ASP.Net Core project
stages:
- build
- publish
.build: &build_template
stage: build
image: microsoft/dotnet:2.1-sdk-alpine
cache:
key: "$CI_PROJECT_NAMESPACE-$CI_PROJECT_NAME"
paths:
public class VerticalTimelineDecoration extends RecyclerView.ItemDecoration {
Paint paintFill = null;
Paint paintStrokeFill = null;
Paint paintStroke = null;
Paint paintDotLine = null;
Paint paintText=null;
Paint paintTextBold=null;