Skip to content

Instantly share code, notes, and snippets.

View slimlime's full-sized avatar
😀
Hello, welcome to Weiber.

slimlime

😀
Hello, welcome to Weiber.
  • Australia
View GitHub Profile
@slimlime
slimlime / Swift4_JSON_09.swift
Created December 17, 2018 05:58 — forked from magicien/Swift4_JSON_09.swift
How should I inherit Codable class?
import Foundation
let json = """
{
"a": 1,
"b": 2,
"c": 3
}
""".data(using: .utf8)!
import Foundation
import SceneKit
let json = """
{
"position": [2.0, 5.0, 3.0],
"rotation": [0.0, 0.73, 0.0, 0.73]
}
""".data(using: .utf8)!
@slimlime
slimlime / multiple_ssh_setting.md
Created December 3, 2018 01:14 — forked from jexchan/multiple_ssh_setting.md
Multiple SSH keys for different github accounts

Multiple SSH Keys settings for different github account

create different public key

create different ssh key according the article Mac Set-Up Git

$ ssh-keygen -t rsa -C "[email protected]"
@slimlime
slimlime / youtube-dl.md
Created November 2, 2018 20:40
Using youtube-dl to download courses from Pluralsight

Download courses from learning sites with youtube-dl

You can download whole courses from an array of tutorial sites with the CLI tool youtube-dl. In the example further down I'm using my Pluralsight account to get videos from a course at their site. Here is a list of all supported sites that you can download from with this tool

The flags you have to supply may vary depending on which site you make a request to.

You can get a free 3 month trial to Pluralsight by signing up for free to Visual Studio Dev Essentials

Installation

@bwangila
bwangila / Download and Organize Lynda.com Courses with Authentication.md
Last active April 4, 2022 02:07
Lynda.com unfortunately does not allow one to easily download course videos even with a premium subscription. Here, I show you how to easily do that with the open source youtube-dl utility.

youtube-dl INSTALLATION

youtube-dl is a handy little command-line utility that, with the right command, automagically downloads videos from Youtube as well as other platforms such as Vimeo, Lynda.com, BBC, CNN etc..(Full list of supported websites)

Kindly proceed to youtube-dl's Github repo for detailed installation instructions for your respective OS

In case of an error, make sure you have Python 2.6, 2.7 or 3.2+ installed as youtube-dl needs it to run.

USAGE

@slimlime
slimlime / class_decorator.ts
Created July 9, 2018 08:18 — forked from alezhu/class_decorator.ts
TypeScript Decorators Examples
function logClass(target: any) {
// save a reference to the original constructor
var original = target;
// a utility function to generate instances of a class
function construct(constructor, args) {
var c : any = function () {
return constructor.apply(this, args);
}
@slimlime
slimlime / class_decorator.ts
Created July 9, 2018 08:00 — forked from remojansen/class_decorator.ts
TypeScript Decorators Examples
function logClass(target: any) {
// save a reference to the original constructor
var original = target;
// a utility function to generate instances of a class
function construct(constructor, args) {
var c : any = function () {
return constructor.apply(this, args);
}
// When one has to conform to using Regex, ameliorate the nasties and qualify/quantify as many identifiers as you can :boom: :tada:
// E.g. Self-documenting version of an unmaintainable Regex string
// 1. Break it up into readable functions/vars with doc comments
// 2. Build up the parts back into the final result
// Win. :lion: :gem:
@slimlime
slimlime / README.md
Last active July 1, 2018 14:41
[vs-code] Get recommended list of extensions installed extensions

Get recommended list of extensions installed extensions

/*
* @Author : SLim
* @Date : 2018-06-30 13: 58: 47
* @Last Modified time: 2018-06-30 15: 04: 36
*/
// Limited-use, specific problem.
// Showcases a workaround to cast namespace/module definition onto an "any" typed module (because using JavaScript node module require)
// For autocompletion usage, typing to speed up development.