Skip to content

Instantly share code, notes, and snippets.

View 0x7s0lt1's full-sized avatar
🍕

0x7s0lt1 0x7s0lt1

🍕
View GitHub Profile
@npearce
npearce / install-docker.md
Last active November 11, 2024 13:09
Amazon Linux 2 - install docker & docker-compose using 'sudo amazon-linux-extras' command

UPDATE (March 2020, thanks @ic): I don't know the exact AMI version but yum install docker now works on the latest Amazon Linux 2. The instructions below may still be relevant depending on the vintage AMI you are using.

Amazon changed the install in Linux 2. One no-longer using 'yum' See: https://aws.amazon.com/amazon-linux-2/release-notes/

Docker CE Install

sudo amazon-linux-extras install docker
sudo service docker start
@chronon
chronon / ext.txt
Created February 18, 2017 15:38
List of docker-php-ext-install extension names
Possible values for ext-name:
bcmath
bz2
calendar
ctype
curl
dba
dom
enchant
@danharper
danharper / demo.md
Last active January 20, 2024 16:09
Open native Maps apps on iOS and Android in Cordova
iOS (with pin, iOS will lookup address too and show that as label)
maps://?q=LAT,LNG
Android, no pin (just open at location)
geo:LAT,LNG
add_filter( 'wc_order_is_editable', 'wc_make_processing_orders_editable', 10, 2 );
function wc_make_processing_orders_editable( $is_editable, $order ) {
if ( $order->get_status() == 'processing' ) {
$is_editable = true;
}
return $is_editable;
}
@bellbind
bellbind / earth.html
Last active January 24, 2022 01:09
[threejs][html5] Put current location on sphere with geolocation API
<!doctype html>
<html>
<head>
<meta charset="utf-8" />
<script
src="https://cdnjs.cloudflare.com/ajax/libs/three.js/r68/three.min.js"
></script>
<script
src="https://rawgit.com/mrdoob/three.js/master/examples/js/controls/TrackballControls.js"
></script>
@tobsn
tobsn / url.query.js
Created September 14, 2012 03:29
node.js parse array form from query string into array like php does
url.query = function( url ) {
var parsed = this.parse( url, true, false ),
query = Object.keys( parsed.query ),
result = {};
if( query.length > 0 ) {
query.forEach(function(key){
if( key.match( /([^\[]+)\[([^\]]+)\]/g ) ) {
key.replace( /([^\[]+)\[([^\]]+)\]/g, function( $0, $1, $2 ) {
result[$1] = result[$1] || {};
result[$1][$2] = parsed.query[key];