Skip to content

Instantly share code, notes, and snippets.

View cryptixcoder's full-sized avatar

Markus Gray cryptixcoder

View GitHub Profile
@cryptixcoder
cryptixcoder / LoginForm.tsx
Created May 9, 2024 18:38
Next-Auth Setup
"use client"
import { useForm } from 'react-hook-form';
import { Button } from '../ui/button';
import { Card, CardContent, CardFooter, CardHeader } from '../ui/card';
import { Form, FormControl, FormField, FormItem, FormLabel, FormMessage } from '../ui/form';
import { Input } from '../ui/input';
import * as z from 'zod'
import { zodResolver } from '@hookform/resolvers/zod';
import { signIn } from '@/auth';
import { login } from '@/actions';
@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`