Skip to content

Instantly share code, notes, and snippets.

@ryanorsinger
ryanorsinger / installing_anaconda_on_mac.md
Last active April 26, 2024 02:22
Installing Homebrew and Anaconda

Installing Homebrew and Anaconda on a Mac

Install Homebrew

Run the following command on your terminal to install Homebrew. Homebrew is a package manager for Macs and is used to install useful development tools and software.

/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"

Install Anaconda through Homebrew

  1. Run brew install --cask anaconda to install Anaconda
@mplinuxgeek
mplinuxgeek / alias
Created August 27, 2018 07:36
youtube-dl aliases
alias youtube-dl-best='youtube-dl -f "bestvideo[ext=mp4]+bestaudio[ext=m4a]/bestvideo+bestaudio" '
alias youtube-dl-480='youtube-dl -f "bestvideo[height<=480][ext=mp4]+bestaudio[ext=m4a]" '
alias youtube-dl-720='youtube-dl -f "bestvideo[height<=720][ext=mp4]+bestaudio[ext=m4a]" '
alias youtube-dl-4k='echo -e "This will transcode the video from webm to h264 which could take a long time\n\n"; youtube-dl -f "bestvideo[ext=webm]+bestaudio[ext=m4a]" --recode-video mp4 '
alias youtube-dl-mp3='youtube-dl --extract-audio -f bestaudio[ext=mp3] --no-playlist '
@glasslion
glasslion / vtt2text.py
Last active April 30, 2024 12:54
This script convert youtube subtitle file(vtt) to plain text.
"""
Convert YouTube subtitles(vtt) to human readable text.
Download only subtitles from YouTube with youtube-dl:
youtube-dl --skip-download --convert-subs vtt <video_url>
Note that default subtitle format provided by YouTube is ass, which is hard
to process with simple regex. Luckily youtube-dl can convert ass to vtt, which
is easier to process.
@gregblass
gregblass / App.js
Last active September 21, 2019 17:30
Expo/React Navigation - Google Analytics Integration
import React, { Component } from 'react'
import { RootNavigator } from './navigators'
import { GoogleAnalyticsTracker } from './utils/analytics'
import { GA_TRACKING_ID } from './constants'
class App extends Component {
// gets the current screen from navigation state
getCurrentRouteName = (navigationState) => {
if (!navigationState) {
return null
@jonlabelle
jonlabelle / npm_vs_yarn_command_translation_cheatsheet.md
Last active April 11, 2024 15:26
npm vs yarn command translation cheat sheet
@barbietunnie
barbietunnie / udemy-courses-download-using-cookies.md
Last active April 7, 2024 22:24
Downloading Udemy videos with youtube-dl

How to download your Udemy course videos using youtube-dl

$ youtube-dl --list-extractors | grep udemy

Steps

  1. Get link to the course to download. e.g. https://www.udemy.com/course-name/
  2. Login into udemy website, save the cookie from chrome using Chrome (Cookie.txt)[1] export extension. Save it to file udemy-cookies.txt
  3. Get the link of the video that you want to download. usually in format. Use the command provided below where you have to replace the {course_link} and {path_to_cookies_file} with respective paths.
$ youtube-dl {course_link} --cookies {path_to_cookies_file}
<?
// <readme>
/*
This is a lite version of Olark's and Intercom's functionality (without the chat part).
It lets you get feedback from users on your site to your email.
And you won't have to rely on another company anymore!
#killyourdependencies
@DianaEromosele
DianaEromosele / Change "origin" of your GIT repository
Created August 7, 2016 00:31
Change "origin" of your GIT repository
$ git remote rm origin
$ git remote add origin git@github.com:aplikacjainfo/proj1.git
$ git config master.remote origin
$ git config master.merge refs/heads/master
@hissy
hissy / _readme.md
Last active August 15, 2018 17:11
#Mautic How to show error message
  1. open a plain text file, add the following lines, and save:
    Filename: custom_offline.php
  2. upload the file to your mautic root.
  3. if you can check out the error message, please remove custom_offline.php for your security.
import React from "react";
import { render } from "react-dom";
const ParentComponent = React.createClass({
getDefaultProps: function() {
console.log("ParentComponent - getDefaultProps");
},
getInitialState: function() {
console.log("ParentComponent - getInitialState");
return { text: "" };