Skip to content

Instantly share code, notes, and snippets.

@ZulianTiger
ZulianTiger / digitalocean-deployment.txt
Last active May 3, 2024 00:35
How to Deploy a Next.js Website to a DigitalOcean Server
***Simple and stripped down version of this post: https://www.coderrocketfuel.com/article/how-to-deploy-a-next-js-website-to-a-digital-ocean-server ***
1. Create a New Droplet On DigitalOcean
a) In the first section, select the Ubuntu operating system for your server
b) In the "Authentication" section, make sure the "Password" option is selected and enter a strong root password for your server.
2. Access Server Using Root
a) ssh root@server_ip_address (connect to server from terminal)
3. Add user (OPTIONAL)
import nuke, operator
'''
## Add these lines to your menu.py after putting this file somewhere in your NUKE_PATH
# Manipulate nodes in the node graph
import node_handler
nuke.menu('Nuke').addCommand('Edit/Node/Move/Right', 'node_handler.move(1,0)', 'alt+meta+Right')
nuke.menu('Nuke').addCommand('Edit/Node/Move/Left', 'node_handler.move(-1,0)', 'alt+meta+Left')
nuke.menu('Nuke').addCommand('Edit/Node/Move/Up', 'node_handler.move(0,-1)', 'alt+meta+Up')
@malteneuss
malteneuss / Dockerfile
Created April 28, 2022 19:43
Nextjs + Prisma DB (query and migrations) in Docker
# Adapted from https://github.com/vercel/next.js/blob/canary/examples/with-docker/Dockerfile
# Install dependencies only when needed
FROM node:16-alpine AS deps
# Check https://github.com/nodejs/docker-node/tree/b4117f9333da4138b03a546ec926ef50a31506c3#nodealpine to understand why libc6-compat might be needed.
RUN apk add --no-cache libc6-compat
WORKDIR /app
COPY package.json package-lock.json ./
RUN npm ci
# Rebuild the source code only when needed
@mamchenkov
mamchenkov / git-commit-hash
Last active May 3, 2024 00:28
Find current git commit id/hash
$ git log -1 | grep ^commit | cut -d " " -f 2
dab96492ac7d906368ac9c7a17cb0dbd670923d9
$ git log -1 | grep ^commit | awk '{print $2}'
dab96492ac7d906368ac9c7a17cb0dbd670923d9
@FriedrichWeinmann
FriedrichWeinmann / Invoke-SystemCommand.ps1
Created January 24, 2023 16:54
Execute a scriptblock as SYSTEM by setting up a temporary scheduled task.
function Invoke-SystemCommand {
<#
.SYNOPSIS
Execute a scriptblock as SYSTEM by setting up a temporary scheduled task.
.DESCRIPTION
Execute a scriptblock as SYSTEM by setting up a temporary scheduled task.
.PARAMETER Name
The name of the task
@aamiaa
aamiaa / CompleteDiscordQuest.md
Last active May 3, 2024 00:26
Complete Recent Discord Quest

Complete Recent Discord Quest

Note

This no longer works in browser!

Note

This no longer works if you're alone in vc! Somebody else has to join you!

How to use this script:

  1. Accept the quest under User Settings -> Gift Inventory
@christianparpart
christianparpart / terminal-synchronized-output.md
Last active May 3, 2024 00:16
Terminal Spec: Synchronized Output

Synchronized Output

Synchronized output is merely implementing the feature as inspired by iTerm2 synchronized output, except that it's not using the rare DCS but rather the well known SM ? and RM ?. iTerm2 has now also adopted to use the new syntax instead of using DCS.

Semantics

When rendering the screen of the terminal, the Emulator usually iterates through each visible grid cell and renders its current state. With applications updating the screen a at higher frequency this can cause tearing.

This mode attempts to mitigate that.

//
// TYAudioVideoManager.swift
// Yash Thaker
//
// Created by Yash Thaker on 05/12/18.
// Copyright © 2018 Yash Thaker. All rights reserved.
//
/*
1) mergeVideos(videoUrls: [URL], exportUrl: URL, preset: String? = nil, progress: @escaping Progress, completion: @escaping Completion)
@heroheman
heroheman / ranger-cheatsheet.md
Last active May 3, 2024 00:15
Ranger Cheatsheet

Ranger Cheatsheet

General

Shortcut Description
ranger Start Ranger
Q Quit Ranger
R Reload current directory
? Ranger Manpages / Shortcuts