Skip to content

Instantly share code, notes, and snippets.

@scyto
scyto / docker-swarm-architecture.md
Last active May 8, 2024 23:39
My Docker Swarm Architecture
@AnnieNinaJoyceV
AnnieNinaJoyceV / ODR_ViewController.swift
Created April 29, 2017 06:10
On-Demand Resources - ODR : AppThinning
// Steps to mark ODR resources
// Select file(image, audio, etc) - File inspector - On Demand Resource Tags - Give it a name
class ODR_ViewController: UIViewController {
var tubbyRequest : NSBundleResourceRequest?
@IBOutlet weak var resourceDownloadProgress: UIProgressView! //to show download progress
// fileName is the name of the file's ODR tag
// if you want to download more than 1 file, change String to [String]
func fetchODRResourceWithName(fileName: String) {//to be called when the file needs to be accessed
{"lastUpload":"2019-10-06T18:32:39.184Z","extensionVersion":"v3.4.3"}
@renatolfc
renatolfc / android-client.ovpn
Created December 28, 2014 18:59
A sample OpenVPN client configuration file in the unified format
client
dev tun
remote example.com
resolv-retry infinite
nobind
persist-key
persist-tun
ca [inline]
cert [inline]
key [inline]
@DevinWalker
DevinWalker / woocommerce-optimize-scripts.php
Last active January 8, 2024 13:24
Only load WooCommerce scripts on shop pages and checkout + cart
/**
* Optimize WooCommerce Scripts
* Remove WooCommerce Generator tag, styles, and scripts from non WooCommerce pages.
*/
add_action( 'wp_enqueue_scripts', 'child_manage_woocommerce_styles', 99 );
function child_manage_woocommerce_styles() {
//remove generator meta tag
remove_action( 'wp_head', array( $GLOBALS['woocommerce'], 'generator' ) );
@sgergely
sgergely / gist:3793166
Created September 27, 2012 09:43
Midnight Commander Keyboard Shortcuts for Mac OSX
----- Esc -----
Quick change directory: Esc + c
Quick change directory history: Esc + c and then Esc + h
Quick change directory previous entry: Esc + c and then Esc + p
Command line history: Esc + h
Command line previous command: Esc + p
View change: Esc + t (each time you do this shortcut a new directory view will appear)
Print current working directory in command line: Esc + a
Switch between background command line and MC: Ctrl + o
Search/Go to directory in active panel: Esc + s / Ctrl + s then start typing directory name