Skip to content

Instantly share code, notes, and snippets.

🎯
Focusing

Ashok Bakthavathsalam kgashok

🎯
Focusing
Block or report user

Report or block kgashok

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@kgashok
kgashok / mutableTuple.py
Last active Jun 3, 2019
"Tuples are immutable, but their mutable constituents, if any, are mutable!"
View mutableTuple.py
tup1 = (1, 2, [3, 4, 5])
print(tup1)
print("Tuples are immutable, but their mutable constituents, if any, are mutable!")
tup1[2][2] = 'x'
print(tup1)
# (1, 2, [3, 4, 'x'])
@kgashok
kgashok / enco.html
Created Aug 29, 2018
ENCO Literary Challenge
View enco.html
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<!--<meta name="viewport" content="width=device-width, initial-scale=1.0">-->
<title>ENCO Literary Challenge</title>
<link rel="stylesheet" href="https://www.w3schools.com/w3css/4/w3.css">
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Lato">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
View ENCO Literary Challenge.md
<title>ENCO Literary Challenge</title>
@kgashok
kgashok / replace.html
Last active Jun 4, 2018
replaceString
View replace.html
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>replaceRefactorSaga</title>
<link rel="stylesheet" href="https://stackedit.io/style.css" />
</head>
@kgashok
kgashok / importantTopics.html
Created Apr 6, 2018
importantTopics-kgashok
View importantTopics.html
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>importantTopics-kgashok</title>
<link rel="stylesheet" href="https://stackedit.io/style.css" />
</head>
View importantTopics-kgashok.md
<title>importantTopics-kgashok</title>
@kgashok
kgashok / cron.md
Created Dec 17, 2017 — forked from evancz/cron.md
Cron job to remind myself to stretch
View cron.md

Type crontab -l to see your cron jobs. Type crontab -e to edit them. You have to use Vim apparently.

Add a line like this:

0,30	*	*	*	*	/Users/YOURNAME/Documents/scripts/stretch.sh

That is on every 0th and 30th minute of the hour. Make sure all the separators in there are tabs!

@kgashok
kgashok / replace_words.js
Created Dec 14, 2017 — forked from mrcoles/replace_words.js
Replaces words in a web page
View replace_words.js
// ### Replace words in document
//
// Update all instances of `fromWord` to `toWord` within the text
// in the current document.
//
function replaceWordsInDocument(fromWord, toWord) {
if (/\s/.test(fromWord)) {
throw new Error('You must enter a single word without whitespace');
}
View Hemingway.fibonacci.js
// Ernest Hemingway
function fibonacci(size) {
var first = 0, second = 1, next, count = 2, result = [first, second];
if(size < 2)
return "the request was made but it was not good"
while(count++ < size) {
@kgashok
kgashok / reverseListBetweenMandN.md
Last active Oct 3, 2017 — forked from superlayone/reverseListBetweenMandN.md
Reverse a linked list from position m to n in-place and in one-pass.
View reverseListBetweenMandN.md

##Leetcode-Reverse Linked List II##

Reverse a linked list from position m to n. Do it in-place and in one-pass.

For example: Given 1->2->3->4->5->NULL, m = 2 and n = 4,

return 1->4->3->2->5->NULL.

Note: Given m, n satisfy the following condition:

You can’t perform that action at this time.