Skip to content

Instantly share code, notes, and snippets.

View ozywuli's full-sized avatar
🤖

Ozy Wu-Li ozywuli

🤖
View GitHub Profile
@ifyoumakeit
ifyoumakeit / github-conventional-comments.js
Last active May 6, 2024 14:31
GitHub Conventional Comments (instructions to install in comment below code)
(async function generateReplies(document) {
// https://conventionalcomments.org/#labels
const LABEL = {
praise: "praise",
nitpick: "nitpick",
suggestion: "suggestion",
issue: "issue",
todo: "todo",
question: "question",
thought: "thought",
@adamloving
adamloving / example.ts
Last active July 27, 2021 07:32
Isomorphic (shared) Typescript models for full stack Node Express React Postgres projects #NERP
import { array, object, number, string, date, InferType } from "yup";
import { Model } from "objection";
// Shared
// Shared API data schema (objects shared between client and server)
export const sharedSchema = object({
// none of these are required since not set until save (but they are also not nullable)
id: number()
.integer()
.notRequired(),
@Mau5Machine
Mau5Machine / docker-compose.yml
Last active April 9, 2024 16:00
Traefik Configuration and Setup
version: "3.3"
services:
################################################
#### Traefik Proxy Setup #####
###############################################
traefik:
image: traefik:v2.0
restart: always
@samselikoff
samselikoff / lib-style-group.js
Last active June 25, 2019 01:33
Sample Styled component using EmberMap's Styled mixin.
export default class StyleGroup {
constructor(styles) {
this.styles = styles;
this.name = ''; // must set at runtime
}
}
@navid-taheri
navid-taheri / eb-cli-ubuntu-16-04
Last active July 6, 2023 14:19
How to install eb cli (awsebcli) on Ubuntu 16.04
sudo apt-get update
sudo apt-get -y upgrade
sudo apt-get install python3-setuptools
sudo easy_install3 pip
pip -V
#pip 9.0.1 from /usr/local/lib/python3.5/dist-packages/pip-9.0.1-py3.5.egg (python 3.5)
sudo chown -R username:username ~/.local/
# add to ./*shrc
@eemi
eemi / middleman-with-docker.md
Last active July 11, 2021 07:35
Run a Middleman site with Docker compose
@noelboss
noelboss / git-deployment.md
Last active May 2, 2024 15:47
Simple automated GIT Deployment using Hooks

Simple automated GIT Deployment using GIT Hooks

Here are the simple steps needed to create a deployment from your local GIT repository to a server based on this in-depth tutorial.

How it works

You are developing in a working-copy on your local machine, lets say on the master branch. Most of the time, people would push code to a remote server like github.com or gitlab.com and pull or export it to a production server. Or you use a service like deepl.io to act upon a Web-Hook that's triggered that service.

@clarketm
clarketm / largestBinaryGap.js
Last active October 12, 2022 12:13
Largest Binary Gap (JavaScript)
function largestBinaryGap(num) {
var bin = Math.abs(num).toString(2),
finalMax = 0,
currentMax;
for (var i = 0; i < bin.length; i++) {
currentMax = 0;
while (bin[i] === "0") {
++currentMax && ++i;
}
@vasanthk
vasanthk / System Design.md
Last active May 9, 2024 16:45
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?
@gradosevic
gradosevic / gulpfile_react.js
Last active November 24, 2022 06:27
Working gulpfile.js with gulp-babel ES6 and React
var gulp = require('gulp');
var babel = require("gulp-babel");
var sourcemaps = require('gulp-sourcemaps');
var concat = require('gulp-concat');
var uglify = require('gulp-uglify');
gulp.task('default', () => {
return gulp.src('js/main.js')
.pipe(sourcemaps.init())
.pipe(babel({