Discover gists
This file contains 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 * as Sentry from '@sentry/nextjs'; | |
import posthog from 'posthog-js'; | |
import debug from './debug'; | |
const genericErrorMessage = | |
'Something went wrong, our developers have been notified and will reach out to you shortly to resolve the issue. So sorry for the inconvenience!'; | |
/** | |
* Given an error, logs it to the console in dev environment, logs to sentry in | |
* production, and returns a generic error message for the user. If a "error" |
This file contains 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
Script started on 2025-02-11 23:37:54+07:00 [COMMAND="/home/user/nuttx-release/run-job.sh risc-v-03 " TERM="xterm-256color" TTY="/dev/pts/5" COLUMNS="110" LINES="83"] | |
Now running https://github.com/lupyuen/nuttx-release/blob/main/run-job.sh risc-v-03 | |
Called by https://github.com/lupyuen/nuttx-release/blob/main/run-ci.sh | |
+ job=risc-v-03 | |
+ [[ risc-v-03 == '' ]] | |
+ instance= | |
+ set | |
+ grep TMUX | |
+ true | |
+ neofetch |
This file contains 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
// Protocol for user data fetching | |
protocol UserServiceProtocol { | |
func getUsers() -> [User] | |
} | |
// Service responsible for providing user data | |
class UserService: UserServiceProtocol { | |
func getUsers() -> [User] { | |
return [User(id: 1, name: "Hamza Khalid One", email: "hamza1@example.com"), | |
User(id: 2, name: "Hamza Khalid Two", email: "hamza2@example.com")] |
This file contains 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
Log uploaded on Wednesday, February 12, 2025, 2:37:24 AM | |
Loaded mods: | |
Harmony(brrainz.harmony)[mv:2.3.1.0]: 0Harmony(2.3.3), HarmonyMod(2.3.1) | |
Core(Ludeon.RimWorld): (no assemblies) | |
Royalty(Ludeon.RimWorld.Royalty): (no assemblies) | |
Ideology(Ludeon.RimWorld.Ideology): (no assemblies) | |
Biotech(Ludeon.RimWorld.Biotech): (no assemblies) | |
Big and Small - Framework(RedMattis.BetterPrerequisites): BetterPrerequisites(1.0.0), BSXeno(1.0.0), RedHealth(1.0.0) | |
HugsLib(UnlimitedHugs.HugsLib)[ov:11.0.4]: 0Harmony(av:2.3.3,fv:1.2.0.1), HugsLib(av:1.0.0,fv:11.0.4) | |
Better Gene Graphics Framework(telardo.BetterGeneGraphicsFramework): BetterGeneGraphicsFramework(1.0.0) |
This file contains 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
\documentclass[12pt]{article} | |
\usepackage[utf8]{inputenc} | |
\usepackage[T1]{fontenc} | |
\usepackage[german]{babel} | |
\usepackage{amsmath,amsfonts,amssymb} | |
\usepackage{graphicx} | |
\usepackage{geometry} | |
\usepackage{multicol} | |
\usepackage{tikz} | |
\usepackage{pgfplots} |
This file contains 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
#!/usr/bin/env bash | |
# install rustup if it doesn't exist | |
if ! command -v rustup &> /dev/null | |
then | |
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y | |
fi | |
# install uv if it doesn't exist | |
if ! command -v uv &> /dev/null |
This file contains 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
edges = cv2.Canny(image, 100, 200) |
This file contains 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
print(data['edu'].value_counts()) |
This file contains 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
#!/bin/bash | |
# Function to send a macOS notification | |
send_notification() { | |
osascript -e 'display notification "'"$1"'" with title "'"$2"'"' | |
} | |
# Function to display a countdown in the terminal | |
countdown_timer() { | |
local time_left=$1 |
This file contains 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
#!/bin/sh | |
set -e | |
# Docker Engine for Linux installation script. | |
# | |
# This script is intended as a convenient way to configure docker's package | |
# repositories and to install Docker Engine, This script is not recommended | |
# for production environments. Before running this script, make yourself familiar | |
# with potential risks and limitations, and refer to the installation manual | |
# at https://docs.docker.com/engine/install/ for alternative installation methods. | |
# |