Skip to content

Instantly share code, notes, and snippets.

🕺
Your best friend

Jesstern Rays jsstrn

🕺
Your best friend
Block or report user

Report or block jsstrn

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
@jsstrn
jsstrn / a.js
Created May 2, 2019
Write a function that checks if an array has duplicate values
View a.js
function hasDuplicateValue(array) {
let counter = 0
for (let i = 0; i < array.length; i++) {
for (let j = 0; j < array.length; j++) {
counter++
if (i !== j && array[i] === array[j]) {
return true
}
}
}
@jsstrn
jsstrn / lab-how-the-web-works.md
Last active Feb 21, 2019
Lab: How the web works
View lab-how-the-web-works.md

🌐 Lab: How the web works

IP Address

We've learned that each device connected to a network is assigned an IP address. This includes your mobile phones and computers, and if you have a toaster that's hooked up to the Internet then your toaster, too.

What's the IP address of your computer?

Use ipconfig from your Terminal

View strategy.js
class Payment {
constructor() {
this.paymentMethod = ''
}
setPaymentMethod(paymentMethod) {
this.paymentMethod = paymentMethod
}
pay(amount) {
@jsstrn
jsstrn / diceware.json
Last active Sep 6, 2017
Diceware Word List
View diceware.json
{
"11111" : "a",
"11112" : "a&p",
"11113" : "a's",
"11114" : "aa",
"11115" : "aaa",
"11116" : "aaaa",
"11121" : "aaron",
"11122" : "ab",
"11123" : "aba",
View standup
open -a safari https://youtu.be/X2W3aG8uizA
osascript -e 'set volume output volume 100'
@jsstrn
jsstrn / object-calisthenics.md
Last active May 24, 2017
Object Calisthenics
View object-calisthenics.md
View gist:3cf1f42487f52dd48abd6702cad9f48c
### Keybase proof
I hereby claim:
* I am jsstrn on github.
* I am jsstrn (https://keybase.io/jsstrn) on keybase.
* I have a public key ASCG6WnBjTnsIlYCuk0PoUmbXEOhnBREUXI5DBNYj1pdKwo
To claim this, I am signing this object:
View newSquare.js
export const Square = () => {
const createLength = (length) => {
return 'x'.repeat(length)
}
const createHeight = (length) => {
return 'x' + ' '.repeat(length - 2) + 'x'
}
const createArray = (length) => {
@jsstrn
jsstrn / developer-conferences.md
Last active Oct 18, 2016
List of developer conferences in the region
View developer-conferences.md

January

February

March

April

May

@jsstrn
jsstrn / tips.md
Last active May 31, 2016
Atom shortcuts worth remembering
View tips.md

Here are some shortcut keys worth remembering. They should also work for Sublime Text.

  • Toggle view of sidebar - CMD+K, CMD+B
  • Go to a file - CMD+P then type the file name
  • Select next - CMD+D (Find > Select Next)
  • Select all - CTRL+CMD+G (Find > Select All)
  • Go to beginning/end of the line - CMD+LEFT/RIGHT
  • Select to beginning/end of the line - SHIFT+CMD+LEFT/RIGHT (Selection > Select to Beginning/End of Line)
  • Select the entire line - CMD+L (Selection > Select Line)
  • Select the entire word - SHIFT+CTRL+W (Selection > Select Word)
You can’t perform that action at this time.