Skip to content

Instantly share code, notes, and snippets.

View wesscoby's full-sized avatar
😎
It does get easier...

Emmanuel Sekyere wesscoby

😎
It does get easier...
View GitHub Profile
{
"basics": {
"name": "Emmanuel Sekyere",
"label": "Fullstack Developer",
"picture": "https://avatars0.githubusercontent.com/u/5289465?s=460&v=4",
"email": "[email protected]",
"phone": "(054) 867-4035",
"website": "http://wesscoby.me",
"summary": "I am currently working as a Logistics Personnel, and also working towards earning a BSc. in Information Technology degree at the University of Ghana. I love learning and engaging in conversations related to Web and Software Development, and emerging technologies. I aspire to become a Full Stack Developer.",
"location": {
@wesscoby
wesscoby / commit
Last active May 30, 2019 09:12
A simple bash script to aid in staging and committing files. Meant for #WSL and #Linux Users
#!/bin/bash
# Title : commit
# Date : 16.05.2019
# Author : WessCoby <[email protected]>
# Version : 1.0.2
# Description : A simple bash script to aid in staging and committing files to git
# Options : None
### Git Prefix specifying the current working directory
@wesscoby
wesscoby / csf
Last active May 24, 2019 11:53
Creates a new bash script file in the current working directory. This is meant for #WSL users as it kind of solves the CR [Carriage Return (\r)] and LF [Linefeed (\n)] issue in Windows, since the file will be created in the Linux environment, and not Windows.
#!/bin/bash
# Title : csf
# Date : 17.05.2019
# Author : WessCoby <[email protected]>
# Version : 1.0.0
# Description : Short for 'Create Script File' [A simple bash script creator]
# Creates a new bash script file in the current working directory.
# This kind of solves the CR [Carriage Return (\r)] and LF [Linefeed (\n)] issue in Windows,
# since the file will be created in a Unix environment, and not Windows.
@astoilkov
astoilkov / readme.md
Last active November 16, 2024 12:52
Async Operations with useReducer Hook

Async Operations with useReducer Hook

9 March, 2019

We were discussing with @erusev what we can do with async operation when using useReducer() in our application. Our app is simple and we don't want to use a state management library. All our requirements are satisfied with using one root useReducer(). The problem we are facing and don't know how to solve is async operations.

In a discussion with Dan Abramov he recommends Solution 3 but points out that things are fresh with hooks and there could be better ways of handling the problem.

Problem

@jcavat
jcavat / Dockerfile
Last active November 14, 2024 21:19
docker-compose with php/mysql/phpmyadmin/apache
FROM php:7.1.2-apache
RUN docker-php-ext-install mysqli
@lukas-h
lukas-h / license-badges.md
Last active November 11, 2024 03:22
Markdown License Badges for your Project

Markdown License badges

Collection of License badges for your Project's README file.
This list includes the most common open source and open data licenses.
Easily copy and paste the code under the badges into your Markdown files.

Notes

  • The badges do not fully replace the license informations for your projects, they are only emblems for the README, that the user can see the License at first glance.

Translations: (No guarantee that the translations are up-to-date)

@joshnuss
joshnuss / app.js
Last active October 20, 2024 14:03
Express.js role-based permissions middleware
// the main app file
import express from "express";
import loadDb from "./loadDb"; // dummy middleware to load db (sets request.db)
import authenticate from "./authentication"; // middleware for doing authentication
import permit from "./authorization"; // middleware for checking if user's role is permitted to make request
const app = express(),
api = express.Router();
// first middleware will setup db connection
@Digiman
Digiman / StorageHelper.ts
Last active December 27, 2023 13:34
Simple helper module on TypeScript for using local storage (HTML5) in browser. Also have the class to store the list of emails that need to use for autocomplete in the some pages.
// module with classes and logic for working with local storage in browsers via JavaScript
// see also: http://professorweb.ru/my/html/html5/level5/5_1.php
module StorageHelper {
export interface IStorageItem {
key: string;
value: any;
}
export class StorageItem {
key: string;

Font Face

A mixin for writing @font-face rules in SASS.

Usage

Create a font face rule. Embedded OpenType, WOFF2, WOFF, TrueType, and SVG files are automatically sourced.

@include font-face(Samplino, fonts/Samplino);
@mobilemind
mobilemind / git-tag-delete-local-and-remote.sh
Last active November 2, 2024 08:30
how to delete a git tag locally and remote
# delete local tag '12345'
git tag -d 12345
# delete remote tag '12345' (eg, GitHub version too)
git push origin :refs/tags/12345
# alternative approach
git push --delete origin tagName
git tag -d tagName