Skip to content

Instantly share code, notes, and snippets.

View cryptixcoder's full-sized avatar

Markus Gray cryptixcoder

View GitHub Profile
@cryptixcoder
cryptixcoder / CryptoKitties.sol
Created August 8, 2021 00:40 — forked from yogin/CryptoKitties.sol
CryptoKitties
// Copied from: https://ethfiddle.com/09YbyJRfiI
// CryptoKitties Source code
// Copied from: https://etherscan.io/address/0x06012c8cf97bead5deae237070f9587f8e7a266d#code
pragma solidity ^0.4.11;
/**
* @title Ownable
* @dev The Ownable contract has an owner address, and provides basic authorization control
@cryptixcoder
cryptixcoder / open-in-cloud-shell.md
Created March 7, 2021 22:22 — forked from manekinekko/open-in-cloud-shell.md
gcloud.tips: use the Google Cloud Shell to clone and edit a github repository

Open a github repository in the Cloud Shell

The Google Cloud Shell gives you a handy and quick Shell access to your Cloud instance. One thing you may not know is that you can use the Cloud Shell to clone and edit a Github project. Let's see how.

The trick here is to just call the following URL: https://console.cloud.google.com/cloudshell/open with the following parameters:

  1. git_repo: this is the URL to your github repository
  2. open_in_editor: this would be the file you want to open in the editor
  3. page=editor: this tells the cloud shell to open the code editor
@cryptixcoder
cryptixcoder / sampleREADME.md
Created January 11, 2020 21:34 — forked from FrancesCoronel/sampleREADME.md
A sample README for all your GitHub projects.

FVCproductions

INSERT GRAPHIC HERE (include hyperlink in image)

Repository Title Goes Here

Subtitle or Short Description Goes Here

@cryptixcoder
cryptixcoder / README-Template.md
Created January 11, 2020 20:53 — forked from PurpleBooth/README-Template.md
A template to make good README.md

Project Title

One Paragraph of project description goes here

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.

Prerequisites

@cryptixcoder
cryptixcoder / README.md
Created September 21, 2019 00:50
A node js server which streams mkv to just mkv supported browsers

Setup

Get nodejs from Node

To run

node server.js
@cryptixcoder
cryptixcoder / README.md
Created September 21, 2019 00:50
A node js server which streams mkv to just mkv supported browsers

Setup

Get nodejs from Node

To run

node server.js
@cryptixcoder
cryptixcoder / watermark.js
Created September 18, 2019 17:56 — forked from suissa/watermark.js
Add watermark with Node.js and ffmpeg
var ffmpeg = require('ffmpeg');
try {
var process = new ffmpeg('example.mp4');
process.then(function (video) {
console.log('The video is ready to be processed');
var watermarkPath = 'watermark-suissa.png',
newFilepath = './video-com-watermark.mp4',
settings = {
position : "SE" // Position: NE NC NW SE SC SW C CE CW
@cryptixcoder
cryptixcoder / batch process.js
Created July 27, 2019 23:44 — forked from rick4470/batch process.js
How to Batch Process video conversions using FFMPEG with Node.js
const spawn = require('child_process').spawn;
const parent = process.argv[2];
let videos = [];
if(process.argv[2]){
// Parent Path
const start = parseInt(process.argv[3]);
const end = parseInt(process.argv[4]);
for (let i = start; i <= end; i++) {
videos.push(i);
@cryptixcoder
cryptixcoder / merge-mp4.sh
Created May 15, 2019 11:01 — forked from palaniraja/merge-mp4.sh
Bash script to merge all mp4 videos in current directory (recursively 2 levels). It also updates the chapter marks to retain the folder/filename of source dir
#!/bin/bash
## Script to merge all mp4 videos in current directory (recursively 2 levels)
## And update chapter marks to retain the folder/filename
## Script for merging videos
filename=`basename pwd`
current=`pwd`
@cryptixcoder
cryptixcoder / ffmpeg.md
Created January 2, 2019 13:37 — forked from Orangestar12/ffmpeg.md
personal quick ffmpeg cheat sheet

These are a few quick easy ffmpeg command lines that can be used to make oft-used video formats. I use them a lot so I wrote them down in a txt file but I converted it to markdown to upload here and access on all my pcs.

Feel free to use 'em. I've gathered them through superuser posts, wiki trawls, and personal experience.

General notes

  • Add -movflags faststart to make mp4 files have their headers at the beginning of the file, allowing them to be streamed (i.e. played even if only part of the file is downloaded).
  • mp4 container supports mp3 files, so if libfdk_aac isnt available (it's the only good aac enc) use libmp3lame.
  • For mp4 files, use -preset X to use mp4 enc presets, like slow or superfast. (veryfast or fast is ok)
  • c:v refers to the video codec used (codec: video). Likewise, c:a is audio. If you're using -map or something, this can be extended (-c:a:0: codec: audio: stream 0)