Skip to content

Instantly share code, notes, and snippets.

@mikoim
mikoim / README.md
Last active October 2, 2025 02:55
[Updated! Aug 14 2020] YouTube recommended encoding settings on ffmpeg (+ libx264)

Parameters

Container: MP4

Parameter YouTube recommends setting
-movflags faststart moov atom at the front of the file (Fast Start)

Video codec: H.264

@d1i1m1o1n
d1i1m1o1n / TimeWeb - SSH RSA Key
Created November 9, 2016 06:53 — forked from zetrider/TimeWeb - SSH RSA Key
Авторизация SSH по RSA ключу - TimeWeb
user - имя пользователя
server.timeweb.ru - сервер
1. На машине ssh-keygen -t rsa
2. Копируем, можно по FTP или одной из команд
2.1. ssh-copy-id -i ~/.ssh/id_rsa [email protected]
2.2. scp ~/.ssh/id_rsa.pub [email protected]:~
3. На сервере
[ -d ~/.ssh ] || (mkdir ~/.ssh; chmod 711 ~/.ssh) # создание директории и изменение прав
cat ~/id_rsa.pub >> ~/.ssh/authorized_keys # добавление открытого ключа
@DavidWells
DavidWells / generate-md-files.js
Last active February 1, 2021 13:55
Generate markdown files with faker.js
var faker = require('faker')
var fs = require('fs')
var path = require('path')
for (var i = 0; i < 1000; i++) {
generateMD()
}
function generateMD () {
var fileName = faker.lorem.word() + '-' + faker.lorem.word()
@hrbrmstr
hrbrmstr / f1000.csv
Created March 23, 2016 16:02
2015 Fortune 1000 List with industry & website
name industry sector website rank
Walmart General Merchandisers Retailing http://www.walmart.com 1
Exxon Mobil Petroleum Refining Energy http://www.exxonmobil.com 2
Chevron Petroleum Refining Energy http://www.chevron.com 3
Berkshire Hathaway Insurance: Property and Casualty (Stock) Financials http://www.berkshirehathaway.com 4
Apple Computers, Office Equipment Technology http://www.apple.com 5
General Motors Motor Vehicles and Parts Motor Vehicles & Parts http://www.gm.com 6
Phillips 66 Petroleum Refining Energy http://www.phillips66.com 7
General Electric Diversified Financials Financials http://www.ge.com 8
Ford Motor Motor Vehicles and Parts Motor Vehicles & Parts http://www.ford.com 9
@boeric
boeric / README.md
Last active December 3, 2024 14:47
D3 Real Time Chart with Multiple Data Streams

D3 Based Real Time Chart with Multiple Streams

The real time chart is a resuable Javascript component that accepts real time data. The purpose is to show the arrival time of real time events (or lack thereof), piped to the browser (for example via Websockets). Various attributes of each event can be articulated using size, color and opacity of the object generated for the event.

The component allows multiple asynchronous data streams to be viewed, each in a horizontal band across the SVG. New data streams can be added dynamically (as they are discovered by the caller over time), simply by calling the yDomain method with the new array of data series names. The chart will automatically fit the new data series into the available space in the SVG.

The chart's time domain is moving with the passage of time. That means that any data placed in the chart eventually will age out and leave the chart. Currently, the chart history is capped at five minutes (but can be changed by modifying the comp

@boeric
boeric / README.md
Last active December 3, 2024 14:48
D3 Based Real Time Chart

D3 Based Real Time Chart

The real time chart is a resuable Javascript component that accepts real time data. The chart's time domain is moving with the passage of time, which means that any data placed in the chart eventually will age out and leave the chart. In addition to the main chart, the component also manages a "focus" window with a viewport (d3.brush) that can moved and sized to view an arbitrary portion of the time series data.

The component adheres to the pattern described in Towards Reusable Chart.

The following options are currently supported:

  • width and height in pixels (Number)
  • border (Boolean)
@yowu
yowu / HttpProxy.go
Last active October 29, 2025 09:20
A simple HTTP proxy by Golang
package main
import (
"flag"
"io"
"log"
"net"
"net/http"
"strings"
)
@mandiwise
mandiwise / Count lines in Git repo
Last active October 11, 2025 19:44
A command to calculate lines of code in all tracked files in a Git repo
// Reference: http://stackoverflow.com/questions/4822471/count-number-of-lines-in-a-git-repository
$ git ls-files | xargs wc -l
@rtt
rtt / gist:5a2e0cfa638c938cca59
Created August 14, 2014 09:46
example python tinderbot
# encoding: utf8 1,1 Top# encoding: utf8
import argparse
from datetime import datetime
import json
from random import randint
import requests
import sys
from time import sleep
@staltz
staltz / introrx.md
Last active October 26, 2025 03:06
The introduction to Reactive Programming you've been missing