Skip to content

Instantly share code, notes, and snippets.

View soundyogi's full-sized avatar
🦊

KaiserMerkle soundyogi

🦊
View GitHub Profile
@cookiengineer
cookiengineer / apt-pac.sh
Last active September 11, 2023 20:06
APT-PAC - pacman with APT syntax
#!/bin/bash
# Save this file as /usr/bin/apt-pac and chmod +x it.
case "$1" in
autoremove)
pacman -Rns $(pacman -Qdtq);
;;
@mvlabat
mvlabat / ue4-building-scripts
Created September 19, 2016 11:30
Building Unreal Engine 4 MyProject from command line for Windows and Linux platforms
# Windows
Build MyProjectEditor Win64 Development "D:\Unreal\MyProject\MyProject.uproject" -waitmutex
# Linux
Build.sh MyProjectEditor Linux Development "/home/mvlabat/unreal/projects/MyProject/MyProject.uproject" -waitmutex
@juhaelee
juhaelee / react-typescript.md
Last active January 26, 2023 00:52
React + Typescript Cheatsheet

React + Typescript Cheatsheet

Setup

If you use atom... download & install the following packages:

What are Typescript type definition files? (*.d.ts)

// note: I'm using redux-actions in here, so the actions might look a bit different than you are used too
// note: This is not complete but the concepts are
// excerpt from app.js
import { createStore, applyMiddleware } from 'redux';
import thunk from 'redux-thunk';
import fetch from 'isomorphic-fetch'
// note: you could totally leave out the fetch argument here if you set a default (as I do in my actions)
// I'm right now not absolutely sure how I will handle this in the future (the way it is now it is a bit redundant)
@luqmaan
luqmaan / debugging reselect performance.md
Last active July 17, 2017 23:32
debug reselect performance

Debugging reselect performance

Some steps I'm taking to debug bad performance with reselect.

My performance problems are coming from the fact that I am not using reselect properly. I wrote a bunch of selectors that use props but don't do anything to make sure they can be shared across multiple components.

The fix for this is: https://github.com/reactjs/reselect/blob/fec65b63b9a2ffa570348271138d20cf831e0185/README.md#sharing-selectors-with-props-across-multiple-components.

But before rewriting tons of code, I'd like to see which selectors are recomputed the most.

@btroncone
btroncone / ngrxintro.md
Last active February 9, 2024 15:37
A Comprehensive Introduction to @ngrx/store - Companion to Egghead.io Series

Comprehensive Introduction to @ngrx/store

By: @BTroncone

Also check out my lesson @ngrx/store in 10 minutes on egghead.io!

Update: Non-middleware examples have been updated to ngrx/store v2. More coming soon!

Table of Contents

@gaearon
gaearon / reducers.js
Last active December 11, 2020 14:56
How I'd do code splitting in Redux (pseudo code, not tested!)
import { combineReducers } from 'redux';
import users from './reducers/users';
import posts from './reducers/posts';
export default function createReducer(asyncReducers) {
return combineReducers({
users,
posts,
...asyncReducers
});
@soundyogi
soundyogi / 2018_chrome_snippet_gui_import_export.js
Last active December 24, 2023 22:09
A snippet to export and import your chrome snippets
void function() { "use strict"
/* !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! WIP DO NOT USE WIP !!!!!!!!!!!!!!!!!!!!!
DO NOT USE THIS YET.
USE THE 2016 VERSION BELOW PLEASE.
WWWWWWWW WWWWWWWWIIIIIIIIIIPPPPPPPPPPPPPPPPP
W::::::W W::::::WI::::::::IP::::::::::::::::P
W::::::W W::::::WI::::::::IP::::::PPPPPP:::::P
@sword-jin
sword-jin / command.js
Created January 7, 2016 13:06
JavaScript Command Pattern -- es5
function Calculator () {
this._currentValue = 0;
this.commands = [];
}
Calculator.prototype = {
execute: function(command) {
this._currentValue = command.execute(this._currentValue);
this.commands.push(command);
},
@drewsberry
drewsberry / UE4-build.bat
Last active February 21, 2024 07:33
UE4 Windows command line building
:: Build client
RunUAT BuildCookRun -project="full_path.uproject"^
-noP4 -platform=Win64^
-clientconfig=Development -serverconfig=Development^
-cook -allmaps -build -stage^
-pak -archive -archivedirectory="Output Directory"
:: Cook client
RunUAT BuildCookRun -project="full_project_path_and_project_name".uproject^
-noP4 -platform=Win64^