Skip to content

Instantly share code, notes, and snippets.

@AllanJeremy
AllanJeremy / FirebaseUploader.js
Last active May 8, 2024 18:15
Firebase extension of Quasar's QUploader component (that performs firebase uploads)
/** This component is now maintained via the [quasar-helpers repo](https://github.com/AllanJeremy/quasar-helpers) */
import { createUploaderComponent } from "quasar";
import { computed, ref, watch } from "vue";
// Firebase stuff
import {
getDownloadURL,
ref as firebaseRef,
uploadBytesResumable,
} from "@firebase/storage";
@houtianze
houtianze / sysv.init.script.to.systemd.unit.file.md
Last active May 8, 2024 18:15
Convert SysV Init scripts to Systemd Unit File

Let's say you have a SysV Init Script named foo

  1. Copy the file to /etc/init.d/foo

  2. Enable the SysV service: chkconfig --add foo

  3. Enable the SysV service: chkconfig foo on

  4. Start the service: service foo start. After this, systemd-sysv-generator will generate this file /run/systemd/generator.late/foo.service, copy this file to /etc/systemd/system by running: cp /run/systemd/generator.late/foo.service /etc/systemd/system/foo.service

  5. Edit /etc/systemd/system/foo.service by running systemctl edit foo.service, add in the following line to foo.servie (this makes the service installable)

[Install]

@aamiaa
aamiaa / CompleteDiscordQuest.md
Last active May 8, 2024 18:15
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
@wh1tney
wh1tney / deploy-static-site-heroku.md
Last active May 8, 2024 18:14
How to deploy a static website to Heroku

Gist

This is a quick tutorial explaining how to get a static website hosted on Heroku.

Why do this?

Heroku hosts apps on the internet, not static websites. To get it to run your static portfolio, personal blog, etc., you need to trick Heroku into thinking your website is a PHP app. This 6-step tutorial will teach you how.

Basic Assumptions

@FreddieOliveira
FreddieOliveira / docker.md
Last active May 8, 2024 18:12
This tutorial shows how to run docker natively on Android, without VMs and chroot.

Docker on Android ๐Ÿ‹๐Ÿ“ฑ

Edit ๐ŸŽ‰

All packages, except for Tini have been added to termux-root. To install them, simply pkg install root-repo && pkg install docker. This will install the whole docker suite, left only Tini to be compiled manually.


Summary

@mcarilli
mcarilli / nsight.sh
Last active May 8, 2024 18:11
Favorite nsight systems profiling commands for Pytorch scripts
# This isn't supposed to run as a bash script, i named it with ".sh" for syntax highlighting.
# https://developer.nvidia.com/nsight-systems
# https://docs.nvidia.com/nsight-systems/profiling/index.html
# My preferred nsys (command line executable used to create profiles) commands
#
# In your script, write
# torch.cuda.nvtx.range_push("region name")
# ...
'CrazyBus - Venezuelan bus racing/RPG "experiment"
'ONLY FOR SEGA(tm) Genesis(tm)/MegaDrive(tm)
'Codigo en dominio publico o WTFPL, elije tu licencia :)
'===========BEX 1.37 o superior es requerido para compilar esto=========
'cb68k v2.00-branch (Momohime) 18/03/2010
'core 2 - BEX sub/func build
'
'ROADMAP:
'========
'1.xx (noname - 29/10/2005): Ancient codebase
@Nezteb
Nezteb / elixir-language-server-comparison.md
Last active May 8, 2024 18:10
Elixir Language Server Comparisons

Elixir Language Server Implementation Comparison

We'll be comparing the following:

Disclaimers:

@amfathi
amfathi / BaseNavigationCoordinator.swift
Last active May 8, 2024 18:09
Coordinator (NavigationCoordinator + TabBarCoordinator)
import UIKit
// MARK: - Base Coordinator
class NavigationCoordinator: NSObject, Coordinator {
weak var parentCoordinator: Coordinator?
var childCoordinators = [Coordinator]()
var navigationController: BaseNavigationController
weak var startViewController: UIViewController?
@linucksrox
linucksrox / docker-compose.yml
Created November 21, 2023 18:49
Unifi Network Application 8.0.7 with mongodb - docker-compose.yml
version: '3.7'
services:
unifi-db:
image: docker.io/mongo:latest
container_name: unifi-db
volumes:
- ./data:/data/db
- ./init-mongo.js:/docker-entrypoint-initdb.d/init-mongo.js:ro