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
@rxaviers
rxaviers / gist:7360908
Last active July 27, 2024 17:59
Complete list of github markdown emoji markup

People

:bowtie: :bowtie: 😄 :smile: 😆 :laughing:
😊 :blush: 😃 :smiley: ☺️ :relaxed:
😏 :smirk: 😍 :heart_eyes: 😘 :kissing_heart:
😚 :kissing_closed_eyes: 😳 :flushed: 😌 :relieved:
😆 :satisfied: 😁 :grin: 😉 :wink:
😜 :stuck_out_tongue_winking_eye: 😝 :stuck_out_tongue_closed_eyes: 😀 :grinning:
😗 :kissing: 😙 :kissing_smiling_eyes: 😛 :stuck_out_tongue:
@mobilemind
mobilemind / git-tag-delete-local-and-remote.sh
Last active July 2, 2024 00:02
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

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);
@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;
@joshnuss
joshnuss / app.js
Last active March 4, 2024 00:01
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
@lukas-h
lukas-h / license-badges.md
Last active July 27, 2024 13:38
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)

@jcavat
jcavat / Dockerfile
Last active July 19, 2024 11:36
docker-compose with php/mysql/phpmyadmin/apache
FROM php:7.1.2-apache
RUN docker-php-ext-install mysqli
@astoilkov
astoilkov / readme.md
Last active March 13, 2024 10:19
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

@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 <cobygiven@gmail.com>
# 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.
@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 <cobygiven@gmail.com>
# 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