Skip to content

Instantly share code, notes, and snippets.

Avatar
💀
alter.

gregory nicholas gregorynicholas

💀
alter.
View GitHub Profile
@statik
statik / convert-to-prores
Created Apr 7, 2020
convert video file to prores
View convert-to-prores
#!/usr/bin/env bash
set -eo pipefail
USAGE='convert-to-prores inputfile [outputfile] [prores setting 1 to 5, default 3]'
DESCRIPTION='
Converts a video file to ProRes for playback on HyperDeck or NLE
The outputfile is optional, if not provided it will be based on the input file name
The profile switch takes an integer from -1 to 5 to match the ProRes profiles
View cyclic-rotation.markdown

Cyclic Rotation - Array

An array A consisting of N integers is given. Rotation of the array means that each element is shifted right by one index, and the last element of the array is moved to the first place. For example, the rotation of array A = [3, 8, 9, 7, 6] is [6, 3, 8, 9, 7] (elements are shifted right by one index and 6 is moved to the first place).

The goal is to rotate array A K times; that is, each element of A will be shifted to the right K times.

Write a function:

function solution($A, $K);

@seppestas
seppestas / git-tricks.md
Last active Mar 23, 2020
Git tricks and tips
View git-tricks.md

Git tricks

A place to store git tricks I use (and still forget sometimes).

Access branches using working trees

Sometimes it's usefull to access multiple branches of a git repository at the same time, e.g to compare different versions of CAD designs or to allow copying parts from one brach to the other. One way to do this is cloning the repository multiple times, but this typicaly takes a while. For copying things from text files like code a web based repository browser like gitweb or Github works fine, but this isn't always availible.

A more efficient method is using [git's work-tree command][git-worktree]. This allows to check out multiple versions of the same repository, using the same gitdir as the original repo, saving time and space. To do this:

@spencersalazar
spencersalazar / easeInOut.h
Created Jan 27, 2020
Generic easing function with tweakable power and midpoint.
View easeInOut.h
/** Ease in/out function with settable power and midpoint.
Use p parameter to adjust speed at endpoints (cubic: p=3, quartic: p=4)
Midpoint is point at which speed is fastest and uneased.
@param t time or independent variable in range [0,1]. Input should be scaled to this range from whatever source range is expected.
@param p power, e.g. quadratic=2, cubic=3. Non-integral powers can be used to fine-tune the curve.
@param mid midpoint of curve, where it is "most linear".
@return output value in range [0,1]. Can be multiplied to scale to desired range.
@sibinx7
sibinx7 / premier-audio-technique.md
Last active Apr 21, 2020
Adobe premier audio techniques
View premier-audio-technique.md

Remove audio grains

  1. Select audio section
  2. Dialogue -> Balanced Male Voice (Can select anything else)
  3. Choose Audio effect (on top, then on Audio Track Mixer), there is left left chevron icon, click on it
  4. 4 vertical grey color bar, click on dropdown, Noice reduction/restore -> De noice
  5. Change settings and preview output
  6. Furthor adjustment, click dropdown in beelow row, then DeReverb
View Les_bases_en_UX_UI.md

Les bases de l'UX/UI 🎨 🖼

EN COURS D'ECRITURE

L'UX et l'UI sont deux notions étroitement liées qui vont permettre à un site ou à une interface de se distinguer.
L'UX (User Experience) se concentre principalement sur l'utilisateur et va chercher à répondre à un besoin, tandis ce que l'UI (User Interface) va enjoliver cette même interface pour rendre la navigation plus confortable.

Optimiser son expérience utilisateur (UX)

Afin d'avoir une expérience utilisateur adaptée à son projet, il est important de se poser les bonnes questions et de suivre quelques étapes.

1️⃣ Définir le besoin

Il est intéressant de chercher à connaitre ses utilisateurs en se posant quelques questions utiles à notre projet :

@joeytwiddle
joeytwiddle / github_get_all_forks.sh
Last active May 24, 2020
Add all forks of the current repo as remotes
View github_get_all_forks.sh
#!/usr/bin/env bash
set -e
# See also: https://github.com/frost-nzcr4/find_forks (same thing but in python)
origin_url="$(git remote show origin | grep 'Fetch URL:' | sed 's+.*: ++')"
full_repo_name="$(echo "$origin_url" | sed 's+.*github.com/++ ; s+\.git$++')"
forks_url="https://api.github.com/repos/${full_repo_name}/forks"
View noobrecon.sh
#!/bin/bash
####################################
# Config
##################
HTTPROBE_CONCURRENCY=100
HTTPROBE_TIMEOUT=3000
DIRSEARCH_THREADS=50
View cities.txt
Malishevë, Kosovo
Prizren, Kosovo
Zubin Potok, Kosovo
Kamenicë, Kosovo
Viti, Kosovo
Shtërpcë, Kosovo
Shtime, Kosovo
Vushtrri, Kosovo
Dragash, Kosovo
Podujevë, Kosovo
@ichaer
ichaer / tellmeyoursecrets.js
Last active Jun 21, 2020 — forked from woodwardtw/tellmeyoursecrets.js
google script that lists information on google drive files and folders shared by link
View tellmeyoursecrets.js
var getFullPath = function(pathObj) {
var out = '';
var sep = '/';
var folderIter = pathObj.getParents();
while(folderIter.hasNext()) {
out += sep + folderIter.next().getName();
}
out += sep + pathObj.getName();
return out;
};
You can’t perform that action at this time.