Skip to content

Instantly share code, notes, and snippets.

View yaaminu's full-sized avatar
🏠
Working from home

Amin Abdul Manaf yaaminu

🏠
Working from home
View GitHub Profile
@schacon
schacon / better-git-branch.sh
Created January 13, 2024 18:41
Better Git Branch output
#!/bin/bash
# Colors
RED='\033[0;31m'
GREEN='\033[0;32m'
NO_COLOR='\033[0m'
BLUE='\033[0;34m'
YELLOW='\033[0;33m'
NO_COLOR='\033[0m'
@imomaliev
imomaliev / fields.py
Last active January 12, 2024 14:13 — forked from jpadilla/fields.py
CharacterSeparatedManyField - A Django REST framework field that separates a string with a given separator into a native list and reverts a list into a string separated with a given separator.
from rest_framework import serializers
from rest_framework.fields import empty
from rest_framework.utils import html
class CharacterSeparatedField(serializers.ListField):
"""
Character separated ListField.
Based on https://gist.github.com/jpadilla/8792723.
@jessedhillon
jessedhillon / makertime-calendar.html
Last active September 14, 2019 14:43
MakerTime visual calendar
<html>
<head>
<style type="text/css">
body {
font-family: -apple-system, BlinkMacSystemFont, San Francisco, Roboto, Segoe UI, Helvetica Neue, sans-serif
}
#clock {
display: flex;
flex-flow: column;
@bspaulding
bspaulding / require.js
Created November 22, 2011 20:26
CommonJS Modules Implementation in Pure JS
var exports = {};
var module = {};
function require(id) {
if ( 'undefined' === typeof arguments.callee.require_stack ) { arguments.callee.require_stack = []; }
var require_stack = arguments.callee.require_stack;
if ( 'undefined' === typeof arguments.callee.modules ) { arguments.callee.modules = {}; }
var modules = arguments.callee.modules;
// if currently requiring module 'id', return partial exports