Skip to content

Instantly share code, notes, and snippets.

@Hrissimir
Hrissimir / yt-dlp.conf
Created August 17, 2023 06:34
Instructions: How to install and configure 'yt-dlp' on Windows 10 machine
# =========================================================================
# Instructions: How to install and configure 'yt-dlp' on Windows 10 machine
#
# NOTE: Lines starting with # are treated as comments
# -------------------------------------------------------------------------
#
#
# =========================================================================
# Part I. "Install Prerequisites"
# -------------------------------------------------------------------------
@khakimov
khakimov / gist:3558086
Created August 31, 2012 19:49
Matrix Effect in you terminal
echo -e "\e[1;40m" ; clear ; while :; do echo $LINES $COLUMNS $(( $RANDOM % $COLUMNS)) $(( $RANDOM % 72 )) ;sleep 0.05; done|awk '{ letters="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789@#$%^&*()"; c=$4; letter=substr(letters,c,1);a[$3]=0;for (x in a) {o=a[x];a[x]=a[x]+1; printf "\033[%s;%sH\033[2;32m%s",o,x,letter; printf "\033[%s;%sH\033[1;37m%s\033[0;0H",a[x],x,letter;if (a[x] >= $1) { a[x]=0; } }}'
@fscm
fscm / install_cmake.md
Last active May 1, 2024 12:57
[macOS] Install CMake

[macOS] Install CMake

Instructions on how to install the CMake tool on macOS.

Uninstall

First step should be to unsinstall any previous CMake installation. This step can be skipped if no CMake version was previously installed.

To uninstall any previous CMake installations use the following commands:

@benwells
benwells / reduce-example.js
Created May 12, 2016 13:40
Using Array.reduce to sum a property in an array of objects
var accounts = [
{ name: 'James Brown', msgCount: 123 },
{ name: 'Stevie Wonder', msgCount: 22 },
{ name: 'Sly Stone', msgCount: 16 },
{ name: 'Otis Redding', msgCount: 300 } // Otis has the most messages
];
// get sum of msgCount prop across all objects in array
var msgTotal = accounts.reduce(function(prev, cur) {
return prev + cur.msgCount;
@manniru
manniru / reduce-example.js
Created May 30, 2019 21:57 — forked from benwells/reduce-example.js
Using Array.reduce to sum a property in an array of objects
var accounts = [
{ name: 'James Brown', msgCount: 123 },
{ name: 'Stevie Wonder', msgCount: 22 },
{ name: 'Sly Stone', msgCount: 16 },
{ name: 'Otis Redding', msgCount: 300 } // Otis has the most messages
];
// get sum of msgCount prop across all objects in array
var msgTotal = accounts.reduce(function(prev, cur) {
return prev + cur.msgCount;
var request = require("request");
var options = { method: 'POST',
url: 'http://192.168.0.124:1313/api/items',
headers:
{ 'Postman-Token': 'bb425338-e09d-4a35-874d-06049d2a2014',
'cache-control': 'no-cache',
'Content-Type': 'application/json' },
body: { id: 1, name: 'Item 1', price: 100, categoryId: 1, status: 1 },
json: true };
<!DOCTYPE html>
<html lang="en" >
<head>
<meta charset="UTF-8">
<title>A-Frame Object Model mtl file</title>
<script src="https://aframe.io/releases/0.9.0/aframe.min.js"></script>
@hwindo
hwindo / firebase.js
Last active May 1, 2024 12:56
Checking firebase initialization
// basic checking
// if (firebase.apps.length === 0) {
// firebase.initializeApp({
// // ... firebase config
// })
// }
// node module
// example named file: firebase.js
/**
@manniru
manniru / firebase.js
Last active May 1, 2024 12:56 — forked from hwindo/firebase.js
Checking firebase initialization
// basic checking
// if (firebase.apps.length === 0) {
// firebase.initializeApp({
// // ... firebase config
// })
// }
// node module
// example named file: firebase.js
/**
// Anyone can read or write to the bucket, even non-users of your app.
// Because it is shared with Google App Engine, this will also make
// files uploaded via GAE public.
service firebase.storage {
match /b/{bucket}/o {
match /{allPaths=**} {
allow read, write;
}
}
}