Skip to content

Instantly share code, notes, and snippets.

View linnykoleh's full-sized avatar
🎯
Focusing

Oleh Linnyk linnykoleh

🎯
Focusing
View GitHub Profile
@linnykoleh
linnykoleh / get.java
Created March 29, 2017 04:02
Getting value from an array
public V get(Object key) {
final int hashCodeForKey = hash(key);
final Node<K,V> nodeByKey = getNode(hashCodeForKey, key);
return nodeByKey == null ? null : nodeByKey.value;
}
private Node<K,V> getNode(int hashCodeKey, Object keySearch) {
Node<K,V> current;
Node<K,V> next;
K keyForNode;
@linnykoleh
linnykoleh / put.java
Created March 29, 2017 03:59
Hash map put node to array by key's hashcode
public V put(K key, V value) {
int hashCodeKey = hash(key);
return putVal(hashCodeKey, key, value);
}
private V putVal(int hashCodeKey, K key, V value) {
int newHashTableSize;
int indexForNode;
Node<K,V> nodeByHashCodeKey;
@ivanskodje
ivanskodje / youtube-dl-download-pluralsight-videos.md
Last active October 1, 2023 07:47
youtube-dl for downloading pluralsight videos

Downloading Videos from Pluralsight

Disclaimer

Pluralsight do not permit users to download their videos.
If you are an user of pluralsight you have agreed with their ToS,
and are thusly refrained from doing so.
Use this knowledge at your own risk.

youtube-dl for Windows

@linnykoleh
linnykoleh / deleteDuplicates.java
Created March 24, 2017 14:23
Remove duplicates from sorted list II
public static ListNode deleteDuplicates(ListNode head) {
if(head == null) return null;
ListNode fake = new ListNode(-1);
fake.next = head;
ListNode pre = fake;
ListNode cur = head;
while(cur != null){
while(cur.next != null && cur.val == cur.next.val){
@linnykoleh
linnykoleh / pom.xml
Last active March 24, 2017 14:25
How to run only particular tests with failsafe plugin. Only from `folder3`
<profiles>
<profile>
<id>my-tests</id>
<build>
<plugins>
<plugin>
<artifactId>maven-failsafe-plugin</artifactId>
<configuration>
<excludes>
<exclude>**/stories/folder1/**</exclude>

DOWNLOADING VIDEOS FROM PLURALSIGHT USING YOUTUBE-DL

Youtube-dl can be used to download course videos from pluralsight

   $ youtube-dl --username <myusername> --password <mypassword> "URL to course outline"

Pluralsight may lock you out of your account after you download a lot of content from the site.

@leonardofed
leonardofed / README.md
Last active April 29, 2024 10:49
A curated list of AWS resources to prepare for the AWS Certifications


A curated list of AWS resources to prepare for the AWS Certifications

A curated list of awesome AWS resources you need to prepare for the all 5 AWS Certifications. This gist will include: open source repos, blogs & blogposts, ebooks, PDF, whitepapers, video courses, free lecture, slides, sample test and many other resources.


@punchouty
punchouty / pluralsight.js
Created May 1, 2016 17:46
Pluralsight Video Download
//Login to pluralsight in chrome and Open a course you want to download
//Example - https://app.pluralsight.com/library/courses/aws-automating-cloudformation/table-of-contents
//Click on "Start" or "Resume Course" Button
//chapter listing
var list = document.getElementsByTagName("section");
var counter=0;
for (var i=0; i<list.length; i++) {
if ( list[i].className.match(/\bmodule\b/) ) {
var header_text = list[i].getElementsByTagName("h2")[0].innerText;
var ul = list[i].getElementsByClassName('clips');
@regis-leray
regis-leray / Exclude maven profile
Created February 10, 2014 01:42
Exclude maven profile
mvn clean install '-P!CommercialDBJars,!MediumTests'