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 / 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>
@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;
@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;

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.

@regis-leray
regis-leray / Exclude maven profile
Created February 10, 2014 01:42
Exclude maven profile
mvn clean install '-P!CommercialDBJars,!MediumTests'
@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');
@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

@nrk
nrk / command.txt
Created April 2, 2012 19:19
Using ffprobe to get info from a file in a nice JSON format
ffprobe -v quiet -print_format json -show_format -show_streams "lolwut.mp4" > "lolwut.mp4.json"