Skip to content

Instantly share code, notes, and snippets.

@0xjac
0xjac / private_fork.md
Last active May 6, 2024 13:25
Create a private fork of a public repository

The repository for the assignment is public and Github does not allow the creation of private forks for public repositories.

The correct way of creating a private frok by duplicating the repo is documented here.

For this assignment the commands are:

  1. Create a bare clone of the repository. (This is temporary and will be removed so just do it wherever.)

git clone --bare git@github.com:usi-systems/easytrace.git

@mbleigh
mbleigh / README.md
Last active May 4, 2024 22:03
Firebase Hosting Fetch All Files

Fetch All Files from Firebase Hosting

This script fetches all of the files from the currently deployed version of a Firebase Hosting site. You must be signed in via the Firebase CLI and have "Site Viewer" permission on the site in question to be able to properly run the script.

Running via NPX

npx https://gist.github.com/mbleigh/9c8680cf319ace2f506f57380da66e7d <site_name>
@jakzal
jakzal / crawler-edit.php
Last active January 22, 2024 13:18
Removing nodes with DomCrawler
<?php
<<<CONFIG
packages:
- "symfony/dom-crawler: ~2.3"
- "symfony/css-selector: ~2.3"
CONFIG;
use Symfony\Component\DomCrawler\Crawler;
$html = <<<HTML
@paraya3636
paraya3636 / KotlinAndroidMainApplication
Last active October 7, 2023 23:07
Kotlin Android MainApplication class for global applicationContext.
// Not object class. AndroidManifest.xml error happen.
class MainApplication : Application() {
init {
instance = this
}
companion object {
private var instance: MainApplication? = null