Skip to content

Instantly share code, notes, and snippets.

View revathskumar's full-sized avatar

Revath S Kumar revathskumar

View GitHub Profile
ConnerWill /
Last active March 17, 2024 18:29
ANSI Escape Sequences cheatsheet

ANSI Escape Sequences

Standard escape codes are prefixed with Escape:

  • Ctrl-Key: ^[
  • Octal: \033
  • Unicode: \u001b
  • Hexadecimal: \x1B
  • Decimal: 27
SanariSan /
Last active April 13, 2024 07:15
Telegram HTTP bot API via CURL | Send text, photos, documents, etc.

Here are some examples on how to use Telegram bot api via CURL


For getting messages in private chat with bot

  • Create a bot using @BotFather, get it's token
  • Start conversation with bot
  • Run following curl command
curl | grep -Po '"from":{"id":.+?,'
imjasonh / markdown.css
Last active February 12, 2024 17:18
Render Markdown as unrendered Markdown (see
* {
font-size: 12pt;
font-family: monospace;
font-weight: normal;
font-style: normal;
text-decoration: none;
color: black;
cursor: default;
addyosmani /
Last active April 2, 2024 20:18 — forked from 140bytes/LICENSE.txt
108 byte CSS Layout Debugger

CSS Layout Debugger

A tweet-sized debugger for visualizing your CSS layouts. Outlines every DOM element on your page a random (valid) CSS hex color.

One-line version to paste in your DevTools

Use $$ if your browser aliases it:

~ 108 byte version

evancz /
Last active December 21, 2022 14:28
Ideas and guidelines for architecting larger applications in Elm to be modular and extensible

Architecture in Elm

This document is a collection of concepts and strategies to make large Elm projects modular and extensible.

We will start by thinking about the structure of signals in our program. Broadly speaking, your application state should live in one big foldp. You will probably merge a bunch of input signals into a single stream of updates. This sounds a bit crazy at first, but it is in the same ballpark as Om or Facebook's Flux. There are a couple major benefits to having a centralized home for your application state:

  1. There is a single source of truth. Traditional approaches force you to write a decent amount of custom and error prone code to synchronize state between many different stateful components. (The state of this widget needs to be synced with the application state, which needs to be synced with some other widget, etc.) By placing all of your state in one location, you eliminate an entire class of bugs in which two components get into inconsistent states. We also think yo
staltz /
Last active April 12, 2024 16:37
The introduction to Reactive Programming you've been missing
bryanhunter /
Last active May 22, 2022 12:02
Build Erlang 17.0 on a fresh Ubuntu box (tested on 12.04 and 14.04)
# Pull this file down, make it executable and run it with sudo
# wget
# chmod u+x
# sudo ./
if [ $(id -u) != "0" ]; then
echo "You must be the superuser to run this script" >&2
exit 1
class GroupersController < ApplicationController::Base
def create
@grouper = current_member)
redirect_to home_path
jlongster / console
Last active January 1, 2016 17:29
working debugger with pure JavaScript state machine transform
# will suspend on every function call (very proof of concept,
# it will be really easy to get access to local variables, a
# full stack, and even live evaluate within any closure)
% node test.out.js
[suspended] foo()
> c
[suspended] bar(x)
> c
[suspended] bar(i - 1)
vmarcetic / ability.rb
Created July 21, 2013 20:51
Better view of article on coderwall
class Ability
include CanCan::Ability
def initialize(user)
user ||= # This is used for not logged user if you have a need for it
if User.current_role == 'admin' # From ApplicationController we can get current_role and check it up against the role we want.
can :manage, :all