Skip to content

Instantly share code, notes, and snippets.

View soundyogi's full-sized avatar
🦊

KaiserMerkle soundyogi

🦊
View GitHub Profile
@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
@soundyogi
soundyogi / ue4-building-scripts
Created November 6, 2022 22:59 — forked from mvlabat/ue4-building-scripts
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
@soundyogi
soundyogi / UE4-build.bat
Created November 6, 2022 22:59 — forked from drewsberry/UE4-build.bat
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^
@soundyogi
soundyogi / ipfs-server-setup.md
Created April 25, 2020 15:15 — forked from claus/ipfs-server-setup.md
Host Your Site Under Your Domain on IPFS

Host Your Site Under Your Domain on IPFS

This is a step-by-step tutorial for hosting your website under your domain on IPFS, from zero, on a DigitalOcean Ubuntu 16.04.3 x64 Droplet (i am using the $10 variant with 2GB RAM).

Install IPFS

Log in as root.

First, make sure the system is up to date, and install tar and wget:

@soundyogi
soundyogi / box.js
Created January 22, 2017 14:10 — forked from BonsaiDen/box.js
Really simple AABB only physics engine.
(function(exports) {
// Vector Class -----------------------------------------------------------
// ------------------------------------------------------------------------
function Vector2(x, y) {
this.x = x;
this.y = y;
}
Vector2.prototype = {

The solution I'm using is the following:

Compile the plugin using the command line:

"ENGINE_DIR\UE_4.22\Engine\Build\BatchFiles\RunUAT.bat" BuildPlugin -Plugin="PATH_TO_MY_PLUGIN\MyPlugin.uplugin" -Package="PATH_TO_BUILD_FOLDER" -TargetPlatforms=Win64 -Rocket -precompile

Obviously replace ENGINE_DIR, PATH_TO_MY_PLUGIN, MyPlugin, PATH_TO_BUILD_FOLDER

Note that you should either add -precompile to the argument (as above) or put bPrecompile=true into your build.cs files

Generations
The most important factor that differentiates CSS-in-JS libraries is how dynamic they are. By that we mean whether a CSS-in-JS library can use JavaScript variables in its templates, and — if so — to what scope of variables those templates have access to? Module scope? Component scope? Or maybe .render() method scope?
Below we define five generations of CSS-in-JS libraries based on their template dynamicity and whether they use inline styles or inject actual CSS; starting from generation one — for the most static libraries — and going all the way up to generation five. Although not strictly true, this also corresponds to how React styling libraries evolved over time.
1st Generation
First generation React styling libraries don't allow you to write styling in JavaScript and use any of JavaScript variables, instead, you have to use CSS pre-processors. The CSS source files are usually located in separate .*css files.
Notable example: css-modules
2nd Generation
#!/bin/bash
sudo apt install build-essential checkinstall
sudo apt-get install libreadline-gplv2-dev libncursesw5-dev libssl-dev libsqlite3-dev tk-dev libgdbm-dev libc6-dev libbz2-dev
sudo apt install python2.7
curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.34.0/install.sh | bash
git clone https://github.com/c9/core.git c9sdk
@soundyogi
soundyogi / devtools_require_snippets.js
Last active August 21, 2019 11:42
Require your devtools snippets in your devtools snippets.
window.__modules__ = {}
window.require = require
var modules = window.__modules__
Promise
.resolve()
.then(get_snippets)
.then(deserialize)
.then(function(snippets){
@soundyogi
soundyogi / clean.sh
Last active June 10, 2019 20:06 — forked from jdowning/ami-clean.sh
Script to clean up Ubuntu
#!/bin/bash
function print_green {
echo -e "\e[32m${1}\e[0m"
}
print_green 'Start'
print_green 'Cleanup log files'
find /var/log -type f | while read f; do echo -ne '' > $f; done