Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

View barelyhuman's full-sized avatar

Siddharth Gelera (reaper) barelyhuman

View GitHub Profile
@barelyhuman
barelyhuman / vscode.json
Last active March 13, 2020 06:21
My VSCode Setup
{
"editor.fontFamily": "'Ubuntu Mono','Liga Ubuntu Mono'",
"editor.fontSize": 16,
"editor.tabSize": 2,
"editor.insertSpaces": true,
"editor.trimAutoWhitespace": true,
"files.insertFinalNewline": true,
"workbench.colorTheme": "Material Theme Darker",
"workbench.iconTheme": "material-icon-theme",
"workbench.colorCustomizations": {
:root{
--form-large-font: 1rem;
--form-large-line-height: 1.5rem;
--form-large-height: 48px;
--form-small-font: 0.875rem;
--form-small-line-height: 0.875rem;
--form-small-height: 32px;
--form-font: 0.875rem;
--form-line-height: 1.25rem;
--form-height: 40px;
/**
* @param {array} array The array you want length for
* @param {Object} options dictionary of strings for return
* @param {string} options.singular string for singular count
* @param {string} options.plural string for plural count
* @param {string} options.default string to return no matter the nature of the count
* @param {string} toInterpolate The string value wrapped in `{{}}` will be replaced by the count value on return
*/
function getCount(array,options={},toInterpolate) {
(function () {
document
.querySelectorAll(".btn-link.timeline-comment-action")
.forEach((item) => item.click());
document.querySelectorAll("summary").forEach((item) => {
if (item.innerHTML.indexOf("Delete workflow run") > -1) {
item.click();
}
});
@barelyhuman
barelyhuman / shell-setup.sh
Created April 30, 2021 01:55
my zsh base setup
#!/bin/zsh
if [ ! -d ~/.oh-my-zsh ]; then
sh -c "$(curl -fsSL https://raw.github.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
fi
if ! command -v git &> /dev/null
then
echo "git wasn't found, install it"
exit
@barelyhuman
barelyhuman / android-cli-setup.sh
Last active April 30, 2021 02:10
Setup Android tools for CLI , assumes jdk was already installed
#!/bin/bash
SDK_VERSION=commandlinetools-linux-6609375_latest.zip
ANDROID_BUILD_VERSION=30
ANDROID_TOOLS_VERSION=30.0.3
NDK_VERSION=20.1.5948944
# set default environment variables
ANDROID_HOME=$HOME/android
ANDROID_SDK_HOME=${ANDROID_HOME}
ANDROID_NDK=${ANDROID_HOME}/ndk/$NDK_VERSION
@barelyhuman
barelyhuman / vscode-v2.json
Last active June 15, 2021 12:20
Version 2 of my current base vscode settings
{
// Theme and Layout settings
"workbench.colorTheme": "Vitesse Light",
"workbench.iconTheme": "quill-icons-minimal",
"workbench.productIconTheme": "icons-carbon",
"editor.renderIndentGuides": false,
"editor.renderWhitespace": "none",
"editor.minimap.renderCharacters": false,
"workbench.startupEditor": "none",
"workbench.sideBar.location": "right",
@barelyhuman
barelyhuman / full-stack-monorepo.md
Last active June 24, 2021 05:01
Full Stack Assignment

Full Stack Assignment

Deadline

  • 3 days after the initial commit

Evaluation Pointers

  • A Github repository to maintain the code
  • I'll go through you commit history to figure out your thought process so make sure you write your commits properly
  • The assignment is to test your skill level to what you claim to be so even if you can't complete the assignment completely, it is still fine to submit a half baked version till the deadline so we can at least analyse the code quality.
  • Your initial commit is just going to be a simple README.md file that has fountane assignment as its content or if using a boilerplate, the boilerplate is the initial commit.

Angular Web Assignment

The following is a simple implementation that tests your knowledge on a few things that most of our apps depend on. There's a huge chance you don't understand a certain library or tech. If so, there's certain things I'll point to as skippable and you can go ahead with that.

Deadline

  • The deadline is 5 days after the initial commit.

Deliverables

You can generate static htmls that you can either host on Github Pages, Netlify or Firebase.

@barelyhuman
barelyhuman / main.js
Created June 29, 2021 20:52
Make API calls synchronous in web workers using atomics
// Simple js file that index.html has as a script src or the entry file of the app
let worker = new Worker("worker.js");
worker.postMessage({
url: "https://jsonplaceholder.typicode.com/todos/1",
});