Skip to content

Instantly share code, notes, and snippets.

@scriptnull
scriptnull / .bashrc
Last active January 9, 2024 16:41
My usual bashrc stuff
export PATH="$PATH:$HOME/s"
export PATH="$PATH:/usr/local/go/bin"
export PATH="$PATH:$HOME/go/bin"
b() {
git rev-parse --abbrev-ref HEAD
}
export -f b
c() {

Anwering questions after 1 week of Moto G82 usage - https://twitter.com/Vikas49499827/status/1542026689156329473

  1. Regarding overall User Experience

It is good! Main thing that I love is how decent Moto is in not shipping bloatwares to this device. I loved all Moto gestures (chop chop for tourch, twist twist for camera) - became my default way to open these apps. Also love the "Peek for notifications" feature which lets me manage notifications without unlocking the phone.

How's call quality and signal reception?

Good. Didn't have any problems with it.

@scriptnull
scriptnull / .db.md
Last active August 3, 2020 16:34
Simple Database for RC

This file is intended to be used as a rough work which could be used to take notes related to this project.

const rows = document.getElementsByTagName('tr');
let results = [];
for (const row of rows) {
const arr = Array.from(row.children);
const startIdx = arr.findIndex((td) => td.hasAttribute('data-sort-value'));
if (startIdx == -1)
continue;
@scriptnull
scriptnull / ignite.xml
Last active May 27, 2020 15:32
Apache ignite sample config
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="
http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans.xsd">
<bean id="ignite.cfg" class="org.apache.ignite.configuration.IgniteConfiguration">
<property name="dataStorageConfiguration">
<bean class="org.apache.ignite.configuration.DataStorageConfiguration">
@scriptnull
scriptnull / benchmark-tikv.md
Last active February 10, 2020 12:00
Benchamarking TiKV

Before starting, I want to layout that "I think, I am doing something wrong" and very much appreciate suggestions and help to identify my mistakes.

Hardware

1 Google Cloud Platform VM instance of type n1-standard-8 (8 vCPUs + 30 GB RAM) attached with a local SSD.

I wanted to setup just a single node and do a basic benchmark, before going all in on setting up many nodes.

  • May be this is a mistake?
  • Should I be running multiple nodes?
  • Is 1 PD + 1 TiKV not enough for just using the Raw KV API?
@scriptnull
scriptnull / win-openbox.xml
Created February 3, 2019 17:54
Windows style window management for openbox
<keyboard>
<keybind key="W-Left">
<action name="Unmaximize"/>
<action name="MoveResizeTo"><x>0</x><y>0</y><height>100%</height><width>50%</width></action>
</keybind>
<keybind key="W-Right">
<action name="Unmaximize"/>
<action name="MoveResizeTo"><x>-0</x><y>0</y><height>100%</height><width>50%</width></action>
</keybind>
<keybind key="W-Up">
@scriptnull
scriptnull / templ.cpp
Last active January 3, 2019 18:22
My C++ utility code
#include <vector>
#include <iostream>
#include <algorithm>
#include <stack>
#include <assert.h>
#include <queue>
using namespace std;
namespace util {
@scriptnull
scriptnull / 24hr.twitter.js
Created November 8, 2018 22:00
Scraps all the twitter handles from https://24hrstartup.com/participants
function User(handle, url) {
this.handle = handle;
this.url = url;
}
var users = Array.from(document.querySelectorAll('.participant__image'))
.filter((div) => div.style && div.style.backgroundImage.includes('/twitter/'))
.map((div) => {
let username = div.style.backgroundImage.replace('url("https://avatars.io/twitter/', '');
username = username.replace('")', '');
@scriptnull
scriptnull / .hyper.js
Created August 19, 2018 17:59
My hyper terminal configuration
module.exports = {
config: {
// default font size in pixels for all tabs
fontSize: 12,
// font family with optional fallbacks
fontFamily: 'Menlo, "DejaVu Sans Mono", Consolas, "Lucida Console", monospace',
// terminal cursor background color and opacity (hex, rgb, hsl, hsv, hwb or cmyk)
cursorColor: 'rgba(248,28,229,0.8)',