Skip to content

Instantly share code, notes, and snippets.

View mohitt's full-sized avatar
🎯
Focusing

Mohit Thakral mohitt

🎯
Focusing
View GitHub Profile
git log release-3.8..buy_saveforlater --author="\(Mohit\)\|\(Jones\)" --oneline
{
"draw_white_space": "all",
"font_size": 18,
"ignored_packages":
[
"Vintage"
],
"rulers":
[
120
https://help.github.com/enterprise/2.6/admin/guides/installation/high-availability-configuration/
https://help.github.com/enterprise/2.6/admin/guides/installation/installing-github-enterprise-on-vmware/
http://www.ebay.com/itm/55-Gallon-Metal-Barrel-Empty-Canola-Oil-Drum-/272239958748
# download a movie from einthusan
# you need to have ffmpeg installed
# you can get the url, by inspecting the xhr in chrome dev tools
# on windows use portable version
.\ffmpeg.exe -user-agent "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/52.0.2743.116 Safari/537.36" -i "http://75.126.5.180/einthusancom/hot/D2981.mp4.m3u8?e=1470131671&md5=h0TLi6IIq8tNhWgDrNOSJA" -c -bsf:a aac_adtstoasc BaaghiHindi.mp4
# on ubuntu
ffmpeg -user-agent "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/52.0.2743.116 Safari/537.36" -i "http://75.126.73.16/einthusancom/hot/D9005.mp4.m3u8?e=1471147397&md5=oMxkF0ZbR7lZPNjaaaOm3A" -strict -2 RaghRaghav.mp4
@mohitt
mohitt / gist:0a45c92d2bf42ab21aacf7a441182d55
Created November 23, 2017 15:57 — forked from emptyhammond/gist:1603144
Make a PUT request with jQuery.ajax()
$.ajax({
type: 'POST', // Use POST with X-HTTP-Method-Override or a straight PUT if appropriate.
dataType: 'json', // Set datatype - affects Accept header
url: "http://example.com/people/1", // A valid URL
headers: {"X-HTTP-Method-Override": "PUT"}, // X-HTTP-Method-Override set to PUT.
data: '{"name": "Dave"}' // Some data e.g. Valid JSON as a string
});
/* Some clients do not support PUT or it’s difficult to send in a PUT request. For these cases, you could POST the request with a request header of X-HTTP-Method-Override set to PUT. What this tells the server is that the intended request is a PUT. Obviously this relies on the API you are accessing making use of the X-HTTP-Method-Override Header.*/

Keybase proof

I hereby claim:

  • I am codemerlin on github.
  • I am mohitt (https://keybase.io/mohitt) on keybase.
  • I have a public key ASB9WCt2mMmCnfKQNAHQtgVF3W1PxcJJz3Au3fPkNqzZwQo

To claim this, I am signing this object:

@mohitt
mohitt / temp
Last active February 3, 2018 14:41
input n
i=1
while ( i is not equal to n-1)
k = n/i
if ( k equal to 0)
output "number is not a prime"
i = i +1
output "number is a prime "
local ret_status="%(?:%{$fg_bold[green]%}➜ :%{$fg_bold[red]%}➜ )"
PROMPT='${ret_status} %{$fg[cyan]%}%c%{$reset_color%} $(git_prompt_info)'
ZSH_THEME_GIT_PROMPT_PREFIX="%{$fg_bold[blue]%}git:(%{$fg[red]%}"
ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%} "
ZSH_THEME_GIT_PROMPT_DIRTY="%{$fg[blue]%}) %{$fg[yellow]%}✗"
ZSH_THEME_GIT_PROMPT_CLEAN="%{$fg[blue]%})"
(function() {
var _open = window.open;
window.open = function(str) {
console.log(JSON.stringify(arguments));
console.log(navigator.userAgent);
_open.apply(window, arguments);
};
})();