⌘T | go to file |
⌘⌃P | go to project |
⌘R | go to methods |
⌃G | go to line |
⌘KB | toggle side bar |
⌘⇧P | command prompt |
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
FROM dorowu/ubuntu-desktop-lxde-vnc:focal | |
WORKDIR /root/project | |
RUN apt update && \ | |
apt install -y build-essential | |
RUN curl https://packages.microsoft.com/keys/microsoft.asc | gpg --dearmor > packages.microsoft.gpg && \ | |
install -o root -g root -m 644 packages.microsoft.gpg /usr/share/keyrings/ && \ | |
sh -c 'echo "deb [arch=amd64 signed-by=/usr/share/keyrings/packages.microsoft.gpg] https://packages.microsoft.com/repos/vscode stable main" > /etc/apt/sources.list.d/vscode.list' && \ | |
apt-get install apt-transport-https && \ |
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
add_action('init', function() { | |
register_post_type('blender', [ | |
'public' => true, | |
'label' => 'Blenders', | |
'show_in_graphql' => true, | |
'graphql_single_name' => 'Blender', | |
'graphql_plural_name' => "Blenders" | |
]); | |
}); |
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
package capbuff | |
import ( | |
"bytes" | |
"fmt" | |
"io" | |
"sync" | |
) | |
type Buffer struct { |
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
def north_korean_cipher(coded_sentence) | |
input = coded_sentence.downcase.split("") # takes the input and splits each letter into its own string. Check out this method in IRB to see how it works! Also refer to the ruby docs. | |
decoded_sentence = [] #blank array | |
cipher = {"e" => "a", # This is technically a shift of four letters...Can you think of a way to automate this? Is a hash | |
"f" => "b", # the best data structure for this problem? What are the pros and cons of hashes? | |
"g" => "c", | |
"h" => "d", | |
"i" => "e", | |
"j" => "f", | |
"k" => "g", |
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
// refactored code | |
// first set of functions received from Jake | |
// sum function worked upon receiving; did not modify | |
var sum = function(array){ | |
var total = 0; | |
for(var index in array) | |
total += array[index]; | |
return total; | |
} | |