Skip to content

Instantly share code, notes, and snippets.

View shahinism's full-sized avatar
🌱
Shahining

Reza Khanipour shahinism

🌱
Shahining
View GitHub Profile
@Ladicle
Ladicle / README.org
Last active July 24, 2024 05:14
Emacs Configuration ver. 2022

Ladicle’s Emacs Configuration ver.2022

https://user-images.githubusercontent.com/1159133/156761456-4be104ae-4cb3-420e-81c7-8abd00497d51.png

Outline

Package Management (link)

  • leaf-keywords
    • el-get
    • hydra
  • package-utils
@IanColdwater
IanColdwater / twittermute.txt
Last active October 13, 2024 04:40
Here are some terms to mute on Twitter to clean your timeline up a bit.
Mute these words in your settings here: https://twitter.com/settings/muted_keywords
ActivityTweet
generic_activity_highlights
generic_activity_momentsbreaking
RankedOrganicTweet
suggest_activity
suggest_activity_feed
suggest_activity_highlights
suggest_activity_tweet
@CodyReichert
CodyReichert / react-es6-flow-emacs-configuration.md
Last active July 28, 2024 04:47
Configuring Emacs for react, es6, and flow

Configuring Emacs for react, es6, and flow

For a while, JSX and new es6 syntax had flaky support in emacs, but there's been huge work on a lot of packages. Using emacs for JavaScript with React, ES6, and Flow (or Typescript, etc) is really easy and powerful in Emacs these days.

This is how you can work on modern web development projects with full support for tooling like JSX, Flow types, live eslint errors, automatic prettier.js formatting, and more.

Set up web-mode

web-mode provides most of the underlying functionality, so a huge shout-out to the maintainer(s) there.

// ==UserScript==
// @name Standardnotes RTL Support
// @namespace https://ilola.ir
// @version 1.1
// @description Change directions of Arabic and Persian lines.
// @author Eman Amini
// @match https://app.standardnotes.org/
// @grant none
// ==/UserScript==
var css = ".rtl {direction: rtl;} strong, b {font-weight: 900;} #note-text-editor {font-family: IRANSansWebNoEn, DroidSans, sans-serif !important; text-align: justify;}",
@developit
developit / *state-machine-component.md
Last active February 6, 2021 00:44
265b lib for building pure functional state machine components. https://github.com/developit/state-machine-component

state-machine-component

A tiny (265 byte) utility to create state machine components using two pure functions.

🔥 JSFiddle Demo

Usage

The API is a single function that accepts 2 pure functions as arguments:

How to setup AWS lambda function to talk to the internet and VPC

I'm going to walk you through the steps for setting up a AWS Lambda to talk to the internet and a VPC. Let's dive in.

So it might be really unintuitive at first but lambda functions have three states.

  1. No VPC, where it can talk openly to the web, but can't talk to any of your AWS services.
  2. VPC, the default setting where the lambda function can talk to your AWS services but can't talk to the web.
  3. VPC with NAT, The best of both worlds, AWS services and web.
import sys, marshal, functools, subprocess
child_script = """
import marshal, sys, types;
fn, args, kwargs = marshal.load(sys.stdin)
marshal.dump(
types.FunctionType(fn, globals())(*args, **kwargs),
sys.stdout)
"""
@SomeCrazyGuy
SomeCrazyGuy / bash_pager.sh
Created April 1, 2016 01:25
A pager written entirely using bash 4 builtins, relies on no other system binaries.
#!/bin/bash --noprofile
# DO ALMOST ANYTHING PUBLIC LICENSE
# Everyone is permitted to copy and distribute verbatim or modified
# copies of this code for any purpose as long as any "Credit"
# lines are not removed.
#Credit: /u/linuxversion
#<your Credit line here, if you want>