Skip to content

Instantly share code, notes, and snippets.

@katyhuff
katyhuff / pr-checklist.md
Last active April 26, 2024 06:22
Pull Request Review Checklist
  • Read the PR description
  • Read through all the changes, considering the following questions.
    • Is there anything you can praise about this PR? Start with praise.
    • Are variable names brief but descriptive?
    • Are new/changed functions no longer than a paragraph?
    • Do all function parameters have default values where appropriate?
    • Is the code clear and clean? (see Robert C. Martin's Clean Code)
    • Is there enough documentation?
  • Does the programming style meet the requirements of the repository (PEP8 for python, google for c++, etc.)
@greggyNapalm
greggyNapalm / gist:2413028
Created April 18, 2012 11:37
linux errno codes
# @see /usr/include/asm-generic/errno-base.h
#ifndef _ASM_GENERIC_ERRNO_BASE_H
#define _ASM_GENERIC_ERRNO_BASE_H
#define EPERM 1 /* Operation not permitted */
#define ENOENT 2 /* No such file or directory */
#define ESRCH 3 /* No such process */
#define EINTR 4 /* Interrupted system call */
#define EIO 5 /* I/O error */
@AnneTee
AnneTee / twig-cheat-sheet.md
Last active April 26, 2024 06:22
Drupal 8 Twig cheat sheet

D8 Twig cheat sheet

Conditionals

To check if a field has a value, check to see if the 0 array item is populated. Simply checking if content.field_name is truthy will not work since that variable will be defined even if the field is empty.

{% if content.field_name.0 %}
  {{ field_name }}
{% endif %}
@PurpleVibe32
PurpleVibe32 / vmwk17key.txt
Last active April 26, 2024 06:20
Free VMware Workstation Pro 17 full license keys
Install VMWare Workstation PRO 17 (Read it right. PRO!)
Also, these keys might also work with VMWare Fusion 13 PRO. Just tested it.
Sub to me on youtube pls - PurpleVibe32
if you want more keys - call my bot on telegram. @purector_bot (THE BOT WONT REPLY ANYMORE) - Or: https://cdn.discordapp.com/attachments/1040615179894935645/1074016373228978277/keys.zip - the password in the zip is 102me.
---
This gist can get off at any time.
PLEASE, DONT COPY THIS. IF YOU FORK IT, DONT EDIT IT.
*If you have a problem comment and people will try to help you!
*No virus
@andreyvit
andreyvit / tmux.md
Created June 13, 2012 03:41
tmux cheatsheet

tmux cheat sheet

(C-x means ctrl+x, M-x means alt+x)

Prefix key

The default prefix is C-b. If you (or your muscle memory) prefer C-a, you need to add this to ~/.tmux.conf:

remap prefix to Control + a

@ZigZagT
ZigZagT / Plex Playback Speed.user.js
Last active April 26, 2024 06:15
Plex Web Player Playback Speed Control and Keyboard Shortcuts
// ==UserScript==
// @name Plex Playback Speed
// @namespace https://github.com/ZigZagT
// @version 1.3.1
// @downloadURL https://gist.githubusercontent.com/ZigZagT/b992bda82b5f7a2c9d214110273d3f3c/raw/Plex%2520Playback%2520Speed.user.js
// @updateURL https://gist.githubusercontent.com/ZigZagT/b992bda82b5f7a2c9d214110273d3f3c/raw/Plex%2520Playback%2520Speed.user.js
// @description Add playback speed controls to plex web player with keyboard shortcuts
// @author ZigZagT
// @include /^https?://[^/]*plex[^/]*/
// @include /^https?://[^/]*:32400/
@ggarnier
ggarnier / ffmpeg.sh
Last active April 26, 2024 06:14
ffmpeg commands
# Adding blurred boxes
# - build a layer called b0, a blurred box with size 100x50 and offset 600x50, between 23s and 31s
# - build a layer called b1, a blurred box with size 300x80 and offset 190x270, between 37s and 49s
# - merge the original video and b0 on ovr0
# - merge ovr0 and b1 to build output
ffmpeg -i input.mp4 -filter_complex \
"[0:v]crop=100:50:600:150,boxblur=10:enable='between(t,23,31)'[b0]; \
[0:v]crop=300:80:190:270,boxblur=10:enable='between(t,37,49)'[b1]; \
[0:v][b0]overlay=600:150[ovr0]; \
[ovr0][b1]overlay=190:270[output]" \
@fernandovaller
fernandovaller / js-mask-cpf-cnpj.js
Created December 5, 2018 20:53
Mascara para CPF e CNPJ em JS
function cnpj(v){
v=v.replace(/\D/g,"") //Remove tudo o que não é dígito
v=v.replace(/^(\d{2})(\d)/,"$1.$2") //Coloca ponto entre o segundo e o terceiro dígitos
v=v.replace(/^(\d{2})\.(\d{3})(\d)/,"$1.$2.$3") //Coloca ponto entre o quinto e o sexto dígitos
v=v.replace(/\.(\d{3})(\d)/,".$1/$2") //Coloca uma barra entre o oitavo e o nono dígitos
v=v.replace(/(\d{4})(\d)/,"$1-$2") //Coloca um hífen depois do bloco de quatro dígitos
return v
}
function cpf(v){
hashtag_list = ['travelblog', 'travelblogger', 'traveler']
# prev_user_list = [] - if it's the first time you run it, use this line and comment the two below
prev_user_list = pd.read_csv('20181203-224633_users_followed_list.csv', delimiter=',').iloc[:,1:2] # useful to build a user log
prev_user_list = list(prev_user_list['0'])
new_followed = []
tag = -1
followed = 0
likes = 0
@Lerc
Lerc / index.html
Last active April 26, 2024 06:06 — forked from kahole/index.html
*scratch*.js
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>*scratch*</title>
<style>
body {
font-family: Hack, Menlo, Monaco, 'Droid Sans Mono', 'Courier New', monospace;
white-space: pre;