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 / 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 / git-auto-sign-commits.sh
Created December 3, 2018 00:49 — forked from mort3za/git-auto-sign-commits.sh
Auto sign your git commits
# generate a new pgp key: (better to use gpg2 instead of gpg)
gpg --gen-key
# maybe you need some random work in your OS to generate a key. so run this command: `find ./* /home/username -type d | xargs grep some_random_string > /dev/null`
# check current keys:
gpg --list-secret-keys --keyid-format LONG
# export private key in gpg:
gpg --export-secret-key -a "your_username"
@slimlime
slimlime / Download and Organize Lynda.com Courses with Authentication.md
Created November 2, 2018 20:43 — forked from bwangila/Download and Organize Lynda.com Courses with Authentication.md
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 / 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

@slimlime
slimlime / Forgotten-Things-Machine-Learning-Data-Mining.txt
Created July 28, 2018 07:00
Forgotten things from data mining and machine learning. A bit rough and lengthy. Submission suggested a plain text file... I feel sorry for the reader. Models and explanations are best accompanied with diagrams.
Scenario:
1. Explain the difference between (a) supervised and (b) unsupervised machine learning (i.), and (ii.) give examples of when a machine learning specialist would use each. Additionally, provide a description of algorithms one might use in either or both of these machine learning categories.
The major difference between supervised learning in contrast to unsupervised machine learning is that in supervised the datasets are already labelled (discrete classified, or known values in the variable the analyst is interested in determining), whereas in unsupervised analysis the aim is to produce interesting inferences about the data.
(a.) Supervised machine learning and algorithms
(i.) Supervised machine learning refers to predictive modelling based on known (labelled), prospective training data (e.g. a set of tuples with variable inputs and a known output/label) in the aim to be able to predict subsequent new datasets accordingly (categorical classification and regression continuous variables).
Reg
@slimlime
slimlime / reinvent-2017-youtube.md
Created July 26, 2018 05:44 — forked from stevenringo/reinvent-2017-youtube.md
Links to YouTube recordings of AWS re:Invent 2017 sessions

| Title | Description

@slimlime
slimlime / gist:6362d45498cbe01aba3b1ff5d2ddba7e
Created July 16, 2018 23:43 — forked from jagregory/gist:710671
How to move to a fork after cloning
So you've cloned somebody's repo from github, but now you want to fork it and contribute back. Never fear!
Technically, when you fork "origin" should be your fork and "upstream" should be the project you forked; however, if you're willing to break this convention then it's easy.
* Off the top of my head *
1. Fork their repo on Github
2. In your local, add a new remote to your fork; then fetch it, and push your changes up to it
git remote add my-fork [email protected]
var time = 60; var clock = 300; function TimeHack(){
setInterval(function Applytime() {
document.getElementsByClassName('timerLabel whiteTextWithShadow font-60 ng-binding')["0"].innerText = time; document.getElementsByClassName('timerLabel whiteTextWithShadow font-60 ng-binding')["0"].innerHtml = time;
document.getElementsByClassName('clockHand').rotate = clock;
}, 1);}; function TimeHackm() {
setInterval(function Addtime() {
time = time + 1;
clock = clock + 6;
}, 1000);}
var score = 1;
@slimlime
slimlime / currying.md
Created July 12, 2018 06:26 — forked from donnut/currying.md
TypeScript and currying

TypeScript and currying

In functional programming you often want to apply a function partly. A simple example is a function add. It would be nice if we could use add like:

var res2 = add(1, 3); // => 4

var add10To = add(10);
var res = add10To(5); // => 15
@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);
}