Skip to content

Instantly share code, notes, and snippets.

View dushmis's full-sized avatar
:octocat:
Focusing

Dushyant Mistry dushmis

:octocat:
Focusing
View GitHub Profile
@dushmis
dushmis / git.migrate
Created November 8, 2020 11:16 — forked from niksumeiko/git.migrate
Moving git repository and all its branches, tags to a new remote repository keeping commits history
#!/bin/bash
# Sometimes you need to move your existing git repository
# to a new remote repository (/new remote origin).
# Here are a simple and quick steps that does exactly this.
#
# Let's assume we call "old repo" the repository you wish
# to move, and "new repo" the one you wish to move to.
#
### Step 1. Make sure you have a local copy of all "old repo"
### branches and tags.
@dushmis
dushmis / delete-reddit-comments.js
Created July 25, 2018 16:47
Delete All Reddit Comments Via Chrome Console
$(".togglebutton[data-event-action='delete']").each((e, x) => {
x.click()
});
var i = 0;
setInterval(e => {
$("span.option.error.active a.yes")[0].click()
console.log("deleted ", i++);
}, 500);
@dushmis
dushmis / richhickey.md
Created April 18, 2018 11:16 — forked from prakhar1989/richhickey.md
richhickey.md

Rich Hickey on becoming a better developer

Rich Hickey • 3 years ago

Sorry, I have to disagree with the entire premise here.

A wide variety of experiences might lead to well-roundedness, but not to greatness, nor even goodness. By constantly switching from one thing to another you are always reaching above your comfort zone, yes, but doing so by resetting your skill and knowledge level to zero.

Mastery comes from a combination of at least several of the following:

@dushmis
dushmis / labels_1024.tsv
Created February 5, 2018 13:00 — forked from teamdandelion/labels_1024.tsv
TensorBoard: TF Dev Summit Tutorial
We can make this file beautiful and searchable if this error is corrected: No tabs found in this TSV file in line 0.
7
2
1
0
4
1
4
9
5
9
@dushmis
dushmis / main.go
Created January 8, 2018 05:54 — forked from enricofoltran/main.go
A simple golang web server with basic logging, tracing, health check, graceful shutdown and zero dependencies
package main
import (
"context"
"flag"
"fmt"
"log"
"net/http"
"os"
"os/signal"
@dushmis
dushmis / index.html
Created December 25, 2017 11:07
Test
<!DOCTYPE html>
<meta charset="utf-8">
<body>
<script src="//d3js.org/d3.v3.min.js"></script>
<script>
var width = window.innerWidth,
height = window.innerHeight;
@dushmis
dushmis / iOS and Objective-C snippets.md
Created May 5, 2017 11:52 — forked from robbdimitrov/iOS and Objective-C snippets.md
Useful iOS and Objective-C snippets

iOS and Objective-C snippets

Move content from underneath the navigationBar (iOS 7)

if ([self respondsToSelector:@selector(edgesForExtendedLayout)]) {
    [self setEdgesForExtendedLayout:UIRectEdgeRight|UIRectEdgeBottom|UIRectEdgeLeft];
}

Change the color of the back arrow in navigationBar (iOS 7)

Keybase proof

I hereby claim:

  • I am dushmis on github.
  • I am d6t (https://keybase.io/d6t) on keybase.
  • I have a public key whose fingerprint is 669C 5978 6812 186A A76D 32D6 E7D1 E319 A27B 4427

To claim this, I am signing this object:

@dushmis
dushmis / loadjs.js
Last active August 29, 2015 14:11
load js dynamically
function loadScript(path, callback) {
var script = document.createElement('script');
if (script.onreadystatechange) {
script.onreadystatechange = function() {
var st = script.readyState;
if (st === 'loaded' || st === 'complete') {
if(callback&&"function" === typeof callback){
callback();
}
script.onreadystatechange = null;
@dushmis
dushmis / easing.js
Last active August 29, 2015 14:08 — forked from gre/easing.js
/*
* Easing Functions - inspired from http://gizma.com/easing/
* only considering the t value for the range [0, 1] => [0, 1]
*/
EasingFunctions = {
// no easing, no acceleration
linear: function (t) { return t },
// accelerating from zero velocity
easeInQuad: function (t) { return t*t },
// decelerating to zero velocity