Skip to content

Instantly share code, notes, and snippets.

View viatsko's full-sized avatar

Valerii Iatsko viatsko

  • Google
  • Zurich, Switzerland
  • 06:46 (UTC +02:00)
View GitHub Profile
@kylemanna
kylemanna / arch-linux-install.md
Last active April 4, 2025 08:56 — forked from binaerbaum/arch-linux-install
Minimal instructions for installing arch linux on an UEFI NVMe system with full system encryption using dm-crypt and luks
@tanaikech
tanaikech / submit.md
Last active January 31, 2025 22:28
Uploading Files to OneDrive Using Node.js

In order to use this script, please retrieve client id, client secret and refresh token before. About this, you can see the detail information at https://gist.github.com/tanaikech/d9674f0ead7e3320c5e3184f5d1b05cc.

1. Simple item upload

This is for the simple item upload is available for items with less than 4 MB of content. The detail information is https://dev.onedrive.com/items/upload_put.htm.

var fs = require('fs');
var mime = require('mime');
var request = require('request');
@viatsko
viatsko / ExportKindle.js
Created August 27, 2017 16:05 — forked from jkubecki/ExportKindle.js
Amazon Kindle Export
// The following data should be run in the console while viewing the page https://read.amazon.com/
// It will export a CSV file called "download" which can (and should) be renamed with a .csv extension
var db = openDatabase('K4W', '2', 'thedatabase', 1024 * 1024);
getAmazonCsv = function() {
// Set header for CSV export line - change this if you change the fields used
var csvData = "ASIN,Title,Authors,PurchaseDate\n";
db.transaction(function(tx) {
@staltz
staltz / .bashrc
Created October 16, 2017 12:42
Put this in your ~/.bashrc (or equivalent) file. Then run `reactnativedev "192.168.1.101:8081"`
# Tweak tap coordinates as you wish
function reactnativedev() {
adb shell input keyevent 82;
sleep 0.1;
adb shell input tap 150 1401;
sleep 0.1;
adb shell input tap 150 1401;
sleep 0.1;
adb shell input text "$1";
sleep 0.1;
@viatsko
viatsko / parse-ruby-sd-hash.java
Created October 22, 2017 21:01
Parsing ruby single-dimension hash from java
import java.util.Map;
import java.util.HashMap;
public class ConvertRubySDHash {
public static Map<String, String> convertToObject(String line) {
Map<String, String> result = new HashMap<>();
for (int i = 0; i < line.length(); i++) {
while(i < line.length()) {
if (line.charAt(i) == '=' && line.charAt(i + 1) == '>') {