Skip to content

Instantly share code, notes, and snippets.

View yetti's full-sized avatar
🔌
Unplugged

Yetrina Battad yetti

🔌
Unplugged
View GitHub Profile
@yetti
yetti / ordinal.js
Last active April 27, 2022 21:26 — forked from jlbruno/ordinal.js
Javascript Ordinal Numbers
// found here http://forums.shopify.com/categories/2/posts/29259
var getOrdinal = function(n) {
var s=["th","st","nd","rd"],
v=n%100;
return n+(s[(v-20)%10]||s[v]||s[0]);
}
@yetti
yetti / machine.js
Last active August 5, 2021 05:14
Generated by XState Viz: https://xstate.js.org/viz
// Available variables:
// - Machine
// - interpret
// - assign
// - send
// - sendParent
// - spawn
// - raise
// - actions
@yetti
yetti / webpacker_rails.md
Created February 25, 2021 17:12 — forked from maxivak/webpacker_rails.md
Webpack, Yarn, Npm in Rails

Keybase proof

I hereby claim:

  • I am yetti on github.
  • I am yetti (https://keybase.io/yetti) on keybase.
  • I have a public key ASADm2na3C-1FjRZaeol_mB7fc_3A94rUlUgDOdwrg7zAgo

To claim this, I am signing this object:

@yetti
yetti / completablefuture.txt
Last active July 2, 2020 01:18
Notes on non-blocking REST
https://www.javacodegeeks.com/2015/07/understanding-callable-and-spring-deferredresult.html
suppyAsync() - supply task pool executor as 2nd param
whenAsyncComplete() - set result of promise
thenCompose() - to add new tasks
poolsize: Runtime.getRuntime().availableProcessors() + 1
status = error
name = PropertiesConfig
#filter.threshold.type = ThresholdFilter
#filter.threshold.level = debug
appender.console.type = Console
appender.console.name = STDOUT
appender.console.layout.type = PatternLayout
appender.console.layout.pattern = %d{yyyy-MMM-dd HH:mm:ss a} [%t] %-5p %c{36} - %m%n

Keybase proof

I hereby claim:

  • I am yetti on github.
  • I am yetti (https://keybase.io/yetti) on keybase.
  • I have a public key ASBfNHRwciEKe_wTVYxDVZ0AXjMBSIQIhXvvafjwY3FuKgo

To claim this, I am signing this object:

@yetti
yetti / notes.sh
Last active February 13, 2019 02:33
Sync SVN revision to Git commit notes after BFG clean on SubGit repository.
#!/bin/bash
path=$1
if [[ -n "$path" ]]; then
git fetch origin refs/svn/map:refs/notes/commits
cat $path | git notes copy --stdin
cat $path | cut -d' ' -f 1 | git notes remove --stdin
git notes prune
git update-ref refs/notes/commits $(git commit-tree refs/notes/commits^{tree} -m "notes squashed")
@yetti
yetti / 12in12Px.md
Last active January 25, 2017 04:31
12 apps in 12 weeks Phoenix/Elixir challenge

12 Apps in 12 Weeks Challenge

Building 12 apps in 12 weeks using Phoenix and Elixir

  • Week 01: Reddit Clone
  • Week 02: Blog
  • Week 03: Recipe Box
  • Week 04: Pinterest Clone
  • Week 05: Movie Review App
  • Week 06: Todo App
@yetti
yetti / deploy.sh
Created September 20, 2016 13:56
Deploys Hugo site to Github master branch
#!/bin/bash
echo -e "\033[0;32mDeploying updates to GitHub...\033[0m"
# Add changes to git.
git add -A
# Commit changes.
msg="deploying updates `date`"
if [ $# -eq 1 ]