Skip to content

Instantly share code, notes, and snippets.

@mattiasghodsian
mattiasghodsian / readme.md
Created November 6, 2019 16:22
How to install and use youtube-dl

Ever needed a tutorial or just download non copyrighted material from YouTube to watch or listen offline?

YouTube-dl is a command-line tool which is open source and can be used to download videos from YouTube, Facebook, and other popular sites, see the full list here.


NOTE: Keep in mind some media contains copyrighted material.


@nicolasdao
nicolasdao / webpack.md
Last active July 28, 2023 19:15
Basic damn Webpack config for simple transpilation ES6 to ES5

Install

npm install -D acorn babel-loader @babel/core @babel/preset-env babel-polyfill webpack webpack-cli uglifyjs-webpack-plugin --save-dev

webpack-cli and acorn are dependencies that you, unfortunately, have to install if you want to run this god damn thing without any obscure warnings or errors.

Build

Configure Webpack

@drumadrian
drumadrian / custom-cloudformation-bucket-cleanup.yaml
Created April 2, 2019 21:10
How to Delete S3 Bucket Contents in CloudFormation
AWSTemplateFormatVersion: "2010-09-09"
Description: >
This template builds a bucket and Custom Cloudformation resource that cleans up the bucket on delete
Project site: https://github.com/drumadrian/custom-cloudformation-bucket-cleanup
Parameters:
ArtifactStoreBucketName:
@mikepfeiffer
mikepfeiffer / stress.sh
Created January 27, 2019 21:05
Install Stress Utility on Amazon Linux 2
sudo amazon-linux-extras install epel -y
sudo yum install stress -y
@robmathers
robmathers / groupBy.js
Created October 25, 2018 23:18
A more readable and annotated version of the Javascript groupBy from Ceasar Bautista (https://stackoverflow.com/a/34890276/1376063)
var groupBy = function(data, key) { // `data` is an array of objects, `key` is the key (or property accessor) to group by
// reduce runs this anonymous function on each element of `data` (the `item` parameter,
// returning the `storage` parameter at the end
return data.reduce(function(storage, item) {
// get the first instance of the key by which we're grouping
var group = item[key];
// set `storage` for this instance of group to the outer scope (if not empty) or initialize it
storage[group] = storage[group] || [];

The PATH is an important concept when working on the command line. It's a list of directories that tell your operating system where to look for programs, so that you can just write script instead of /home/me/bin/script or C:\Users\Me\bin\script. But different operating systems have different ways to add a new directory to it:

Windows

  1. The first step depends which version of Windows you're using:
  • If you're using Windows 8 or 10, press the Windows key, then search for and
@lvisintini
lvisintini / README.md
Last active July 2, 2022 08:44
How to install VisualSFM on Ubuntu 16.04 (64-bit)
@fokusferit
fokusferit / enzyme_render_diffs.md
Last active April 15, 2024 09:41
Difference between Shallow, Mount and render of Enzyme

Shallow

Real unit test (isolation, no children render)

Simple shallow

Calls:

  • constructor
  • render
@nguyenanhtu
nguyenanhtu / SSLXampp.md
Last active January 20, 2024 23:35
Guide to configure SSL in XAMPP for Windows

How to test 'https' in XAMPP for localhost ? I will guide you

Menu

  • Create certificate
  • Config Apache to access https instead of http
  • Config mod rewrite to generate SSL url
  • Config Virtual host to test site

Step 1 : Create certificate

  • Go to your XAMPP installation directory (in my case it’s E:\xampp), figure out apache folder. In this, find & run batch file
@seventhskye
seventhskye / delete_all_objects.py
Last active February 14, 2023 12:08
A script to delete all objects, versions and delete markers from an s3 bucket.
#!/usr/bin/env python
import boto3
client = boto3.client('s3')
Bucket = 'a-bucket'
Prefix = 'a-prefix' # leave blank to delete the entire contents
IsTruncated = True
MaxKeys = 1000
KeyMarker = None