This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Node(object): | |
def __init__(self, initdata): | |
self._data = initdata | |
self._next = None | |
@property | |
def data(self): | |
return self._data |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Node(object): | |
def __init__(self, initdata): | |
self._data = initdata | |
self._next = None | |
self._prev = None | |
@property | |
def data(self): | |
return self._data |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class KeyValue(object): | |
def __init__(self, key, val): | |
self._key = key | |
self._val = val | |
@property | |
def key(self): | |
return self._key | |
@property |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
2) What 10 IP addresses made the most requests in a log file "LOG.txt" | |
with format: | |
IP PATH RESPONSE_CODE | |
as in: | |
===================== | |
72.249.126.142 /*/http://elementvillage.com 404 | |
72.136.174.175 /*/http://www.1234-find-web-designers.org 200 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
1) Given the following shell transcript, write the program | |
"split-to-files" in any language of your choosing. | |
===================== | |
~$ ls -l | |
total 0 | |
~$ head ../input.txt |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script type="application/ld+json"> | |
{ | |
"@context" : "http://schema.org", | |
"@type" : "Organization", | |
"name" : "Neighborly", | |
"url" : "https://neighborly.com", | |
"logo" : "https://ddth8v70o63jx.cloudfront.net/assets/logo_fb-3970ca6426fd27b2e7115248811ac5db79743fbd1d487a69d790a46275a9fe88.png", | |
"sameAs" : [ | |
"https://www.facebook.com/neighborly", | |
"https://twitter.com/Neighborly", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function flatten(arr, newArr=[]){ | |
console.log(arr) | |
// loop through each item | |
// for (i of arr) { | |
arr.forEach(function(i){ | |
// check if item is an array, | |
if(Array.isArray(i)){ | |
// if true, access array, call again | |
flatten(i, newArr) | |
} else { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const _ = require('lodash'); | |
function saySomething(something) { | |
console.log(something) | |
} | |
function before(n, func) { | |
let result; | |
return function() { | |
if (--n > 0) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
test gist using cli |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# $ code-insiders --list-extensions | xargs -L 1 echo code-insiders --install-extension | |
code-insiders --install-extension akamud.vscode-theme-onedark | |
code-insiders --install-extension akamud.vscode-theme-onelight | |
code-insiders --install-extension bung87.rails | |
code-insiders --install-extension bung87.vscode-gemfile | |
code-insiders --install-extension cduruk.thrift | |
code-insiders --install-extension dhedgecock.ember-syntax | |
code-insiders --install-extension eamodio.gitlens |
OlderNewer