Skip to content

Instantly share code, notes, and snippets.

View bantya's full-sized avatar
🎯
Focussing

Rahul Thakare bantya

🎯
Focussing
  • http://127.0.0.1:4200
  • http://127.0.0.1:8080
  • 05:52 (UTC +05:30)
  • X @rkkth
View GitHub Profile
@eyeseast
eyeseast / python.md
Last active May 6, 2024 17:11
How to set up Python in 2022

I have an updated version of this on my blog here: https://chrisamico.com/blog/2023-01-14/python-setup/.

Python

This is my recommended Python setup, as of Fall 2022. The Python landscape can be a confusing mess of overlapping tools that sometimes don't work well together. This is an effort to standardize our approach and environments.

Tools and helpful links:

  • Python docs: https://docs.python.org/3/
  • Python Standard Library:  - Start here when you're trying to solve a specific problem
@KyleKilmartin371
KyleKilmartin371 / colorRegex.md
Last active August 29, 2022 15:22
Regex for hex colors

Regex for hex colors

A Regex (regular Expression) is a snippet of code that is used to extract bits of information from any field of text. It accomplishes this by setting up key parameters to search for within a body of text. A regex is a very powerful tool and can be used in almost all programable languages like JavaScript, Java, VB, Python, and many more!

Summary

The regex that we will be looking at in this gist is for hex colors. A hex color is a representation of various colors that follows a specific hexadecimal integer count so it is fairly easy to keep track of. The regex to search for a hex color code will be: ^#([a-fA-F0-9]{6}|[a-fA-F0-9]{3})$. Bellow we will break apart the different parts of this regex so that we can better understand what is being shown.

Table of Contents

@OdatNurd
OdatNurd / tab_color.py
Created June 21, 2021 18:21
A simple plugin for changing Sublime Text file tab colors based on the filename and paths of files
import sublime
import sublime_plugin
import re
def plugin_loaded():
"""
When the plugin loads, set up to monitor the user preferences changing so
that we can change tab colors on settings change.
@privatenumber
privatenumber / light-dark-image.svg
Last active October 22, 2024 05:40
Light/dark mode SVG image
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@lancejpollard
lancejpollard / list.csv
Created March 28, 2021 15:27
List of Wiktionary Languages
language url
'Are'are language https://en.wiktionary.org/wiki/Category:%27Are%27are_language
A'ou language https://en.wiktionary.org/wiki/Category:A%27ou_language
A-Hmao language https://en.wiktionary.org/wiki/Category:A-Hmao_language
A-Pucikwar language https://en.wiktionary.org/wiki/Category:A-Pucikwar_language
Aari language https://en.wiktionary.org/wiki/Category:Aari_language
Aasax language https://en.wiktionary.org/wiki/Category:Aasax_language
Aba language https://en.wiktionary.org/wiki/Category:Aba_language
Abaga language https://en.wiktionary.org/wiki/Category:Abaga_language
Abai language https://en.wiktionary.org/wiki/Category:Abai_language
/** Helping function used to get all methods of an object */
const getMethods = (obj) => Object.getOwnPropertyNames(Object.getPrototypeOf(obj)).filter(item => typeof obj[item] === 'function')
/** Replace the original method with a custom function that will call our aspect when the advice dictates */
function replaceMethod(target, methodName, aspect, advice) {
const originalCode = target[methodName]
target[methodName] = (...args) => {
if(["before", "around"].includes(advice)) {
aspect.apply(target, args)
@MatsAnd
MatsAnd / mac.apps.md
Last active June 9, 2022 10:56
Mac Apps and Utilities I use
@max-mapper
max-mapper / index.js
Last active May 17, 2023 06:09
JavaScript Base-40 Class
// based on https://github.com/blockstack/blockstack-core/blob/ff86948ed2f720824cd5e6ece6a63aaaf2bf81ff/blockstack/lib/b40.py
class B40 {
constructor() {
this.B16_CHARS = '0123456789abcdef'
this.B40_CHARS = '0123456789abcdefghijklmnopqrstuvwxyz-_.+'
}
divmod(x, y) {
const div = x / y
const rem = x % y
@jfcherng
jfcherng / st4-changelog.md
Last active August 18, 2024 07:25
Sublime Text 4 changelog just because it's not on the official website yet.
@JeffreyWay
JeffreyWay / AppServiceProvider.php
Last active November 6, 2021 11:51
Laracasts Widgets Lesson
<?php
namespace App\Providers;
use Illuminate\Support\Facades\Blade;
use Illuminate\Support\ServiceProvider;
class AppServiceProvider extends ServiceProvider
{
/**