This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ffcompress () { | |
| local TARGET_SIZE="$1" | |
| local INPUT="$2" | |
| if [[ -z "$TARGET_SIZE" || -z "$INPUT" ]]; then | |
| echo "Usage: ffcompress 10mb input.mp4" | |
| return 1 | |
| fi | |
| # Strip non-numeric characters |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import os | |
| import time | |
| import sched | |
| import threading | |
| import inquirer | |
| class Tamagotchi: | |
| age = 0 | |
| bored = 0 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package main | |
| import ( | |
| "fmt" | |
| ) | |
| var sequences = [][]int{ | |
| []int{}, | |
| []int{1}, | |
| []int{1, 1}, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| let a = [1, 3, 5, 0, 0, 0]; | |
| let b = [2, 4, 6]; | |
| function merge(a, b) { | |
| return [...new Set([...a, ...b])].filter(function (item) { | |
| return item !== null && item !== undefined && item !== 0; | |
| }).sort((a, b) => a - b); | |
| } | |
| const res = merge(a, b); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /* Container styles */ | |
| .container { | |
| display: flex; | |
| flex-wrap: var(--wrap, wrap); | |
| flex-direction: var(--direction, row); | |
| width: 100%; | |
| margin: calc(var(--spacing, 0px) / -2); | |
| box-sizing: border-box; | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| mysqldump -u MYSQL_USERNAME -p YOUR_DATABASE | gzip -c | ssh USERNAME@YOUR_TO_HOST 'cat > ~/dump.sql.gz' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package main | |
| import ( | |
| "log" | |
| "os" | |
| ) | |
| func main() { | |
| data, err := os.ReadFile("input.txt") | |
| if err != nil { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include <math.h> | |
| #include <proto/dos.h> | |
| #include <proto/exec.h> | |
| #include <proto/graphics.h> | |
| #include <proto/intuition.h> | |
| #include <stdint.h> | |
| #include <stdlib.h> | |
| #define SCREEN_WIDTH 320 | |
| #define SCREEN_HEIGHT 256 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function createLaundryItem() { | |
| let count = 0; | |
| const tasks = [ | |
| "soak", | |
| "wash", | |
| "rinse", | |
| "spin", | |
| "dry", | |
| ]; |
NewerOlder