Skip to content

Instantly share code, notes, and snippets.

View mohitmun's full-sized avatar
💭
yak shaving

Mohit Munjani mohitmun

💭
yak shaving
View GitHub Profile
@mohitmun
mohitmun / backup_upload_s3.sh
Created December 20, 2019 05:59
pg backup and upload to s3
#!/bin/bash
set -Eeo pipefail
# https://vaneyckt.io/posts/safer_bash_scripts_with_set_euxo_pipefail/
exit_with_failure(){
echo "Script failed"
echo "\"${last_command}\" command filed with exit code $?."
}
trap 'last_command=$current_command; current_command=$BASH_COMMAND' DEBUG
//found here https://ashr.net/jash/sh/tl/dr/too/dumb/to/thing/this/thing.aspx
setImmediate(function() {
Java.perform(function() {
var url = Java.use("java.net.URL");
var proxyTypeI = Java.use('java.net.Proxy$Type');
var inetSockAddrWrap = Java.use("java.net.InetSocketAddress");
var proxy = Java.use('java.net.Proxy');
url.$init.overload('java.lang.String').implementation = function (var0) {
#GistID: dd1f4bffde8b23192433df1c93685b2e
require 'pry'
class Test
def first_call(f)
a = f
b = 2
res = second_call(a,b)
puts "\n\n=== result res:#{res} ===\n\n"
return res
end
require 'rubygems'
require 'appium_lib'
require 'benchmark'
require 'browserstack-fast-selenium'
username = ENV["BROWSERSTACK_USERNAME"]
access_key = ENV["BROWSERSTACK_ACCESSKEY"]
caps = {}
caps['build'] = 'Ruby Appium Sample'
{
"news.ycombinator.com": {
"_enabled": true,
"_rules": {
"table#hnmain": {
"font-family": "verdana",
"font-size": "small ",
"width": "60%"
},
"comment0": {
<?xml version="1.0" encoding="UTF-8"?>
<opml version="1.0">
<head>
<title>Subscriptions of nikita.voloboev from Inoreader [https://www.inoreader.com]</title>
</head>
<body>
<outline text="Linux" title="Linux">
<outline text="Julia Evans" title="Julia Evans" type="rss" xmlUrl="https://jvns.ca/atom.xml" htmlUrl="http://jvns.ca/"/>
<outline text="nixCraft" title="nixCraft" type="rss" xmlUrl="https://www.cyberciti.biz/feed/" htmlUrl="https://www.cyberciti.biz/"/>
</outline>
@mohitmun
mohitmun / 00-about-search-api-examples.md
Created April 29, 2018 10:52 — forked from jasonrudolph/00-about-search-api-examples.md
5 entertaining things you can find with the GitHub Search API
@mohitmun
mohitmun / about.md
Created April 29, 2018 10:48 — forked from jasonrudolph/about.md
Programming Achievements: How to Level Up as a Developer
" GistID: 963f95aaf61d50e512511ac4eb097e50
"Constantly improve at vim
" http://vimgolf.com
" http://derekwyatt.org/vim/tutorials/advanced/
" https://statico.github.io/vim3.html
" https://www.reddit.com/r/vim/comments/8gmmk3/how_to_continue_to_improve_at_vim/
" https://stackoverflow.com/q/726894/2577465
"Why
" http://www.viemu.com/a-why-vi-vim.html
"Headstart
CS
DMKS
Heterogeneous programming
OpenCl
https://en.wikipedia.org/wiki/OpenCL
Compilers
Design patterns
https://en.wikipedia.org/wiki/Worse_is_better
File System
File Descriptors