Skip to content

Instantly share code, notes, and snippets.

View tkovs's full-sized avatar
🤜
🤛

tkovs tkovs

🤜
🤛
View GitHub Profile
@guilhermebruzzi
guilhermebruzzi / remove-immutable.md
Last active April 16, 2024 17:46
Remove Immutable JS from your source code

I decided to remove all Immutable code on our big project because it wasn't causing our React to render less (using selectors on our redux layer was actually better).

Since our project has tests to check if everything is still working, I was able to achieve that with the following steps:

Search on all files on vscode or any editor with Use Regular Expression option (command+alt+r on vscode):

(Immutable|\.(size|count\(|toJS(?!\w)|fromJS(?!\w)|first[\(\)]|get\(|set\(|findEntry\(|getIn\(|setIn\(|contains\(|delete\(|asImmutable|add\())

Then on each find that was actually from a Immutable code:

  • Remove Immutable imports
@haskellcamargo
haskellcamargo / Mortivacional.hs
Last active October 25, 2015 01:17
Mortivacional.hs
module Mortivacional where
import System.Console.ANSI
drawLine :: IO ()
drawLine = putStrLn $ replicate 23 '-'
turnRed :: IO ()
turnRed = setSGR [ SetConsoleIntensity BoldIntensity
, SetColor Foreground Vivid Red
]
@rxaviers
rxaviers / gist:7360908
Last active May 1, 2024 14:35
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:
@tobysteward
tobysteward / BlogController.php
Last active March 4, 2024 23:11
Laravel AJAX Pagination with JQuery
<?php
class BlogController extends Controller
{
/**
* Posts
*
* @return void
*/
public function showPosts()
@Kedrigern
Kedrigern / Tree.hs
Last active March 27, 2024 00:43
Implementation of binary search tree in Haskell
{- Implementation of BST (binary search tree)
Script is absolutly free/libre, but with no guarantee.
Author: Ondrej Profant -}
import qualified Data.List
{- DEF data structure -}
data (Ord a, Eq a) => Tree a = Nil | Node (Tree a) a (Tree a)
deriving Show
@douglasrodrigo
douglasrodrigo / lambda_calculus.rb
Created May 28, 2011 03:26
ruby lambda calculus
#base
First = lambda {|a, b| a}
Last = lambda {|a, b| b}
#conditional
True = First
False = Last
Not = lambda {|boolean| boolean[False, True]}
And = lambda {|boolean_a, boolean_b| boolean_a[boolean_b, False]}
Or = lambda {|boolean_a, boolean_b| boolean_a[True, boolean_b]}
@MicahElliott
MicahElliott / colortrans.py
Created November 29, 2010 07:57
Convert values between RGB hex codes and xterm-256 color codes.
#! /usr/bin/env python
""" Convert values between RGB hex codes and xterm-256 color codes.
Nice long listing of all 256 colors and their codes. Useful for
developing console color themes, or even script output schemes.
Resources:
* http://en.wikipedia.org/wiki/8-bit_color
* http://en.wikipedia.org/wiki/ANSI_escape_code