Skip to content

Instantly share code, notes, and snippets.

@gfranxman
gfranxman / Makefile
Last active May 9, 2024 14:36
Makefile help target. Allows you to define groups of targets by starting a line with ## or expose a target with help test by including ## indented or after the target's dependencies.
.PHONY: help
# useage config
TARGETLEN:=$(shell echo 16)
# colors
BLUE:=$(shell echo "\033[0;36m")
GREEN:=$(shell echo "\033[0;32m")
YELLOW:=$(shell echo "\033[0;33m")
RED:=$(shell echo "\033[0;31m")
@peatiscoding
peatiscoding / build-tag-push.py
Created January 24, 2018 15:20
a script to convert your docker-compose.yml (version 2) with build node to image node; this script required DOCKERHUB_USER environment available.
#!/usr/bin/python
import os
import subprocess
import time
import yaml
import re
user_name = os.environ.get("DOCKERHUB_USER")
@plasx
plasx / instantclientguide.md
Last active December 12, 2018 03:15
Installing instant client 12 on macOS Sierra
@jnovack
jnovack / README.md
Last active June 26, 2020 18:00
Using Linux Display on OSX in docker
@bastman
bastman / docker-cleanup-resources.md
Created March 31, 2016 05:55
docker cleanup guide: containers, images, volumes, networks

Docker - How to cleanup (unused) resources

Once in a while, you may need to cleanup resources (containers, volumes, images, networks) ...

delete volumes

// see: https://github.com/chadoe/docker-cleanup-volumes

$ docker volume rm $(docker volume ls -qf dangling=true)

$ docker volume ls -qf dangling=true | xargs -r docker volume rm

@jerivas
jerivas / Mezzanine deployment.md
Last active August 29, 2015 14:15
HOWTO: Deploy a Mezzanine site

[CASE 1] Deploying to a brand new server:

  1. Get your sever. Anything that grants you root access works. VPS's like those from Digital Ocean work great and are cheap.
  2. Fill the FABRIC dictionary in local_settings.py. For SSH_USER provide any username you want (not root), and the fabfile can create it for you.
  3. Run fab secure. You simply need to know the root password to your VPS. The new user will be created and you can SSH with that from now on (if needed).
  4. Run fab all. It will take a while, but after this your Mezzanine site will be live.

Notice that not even once you had to manually SSH into your VPS. Note: some server providers need you to login as root once to change the default password they give you. It should be the only time you are required to SSH into the sever.

[CASE 2] If you already have a server, and you already have created a non-root user with sudo privileges:

@ericmoritz
ericmoritz / .gitignore
Last active December 18, 2015 09:28
Explaining monads without using the work monad.
*.pyc
@jasonkneen
jasonkneen / 1readme.md
Last active May 28, 2021 16:48
Quick example of registering a URLScheme in a Titanium app using the TiApp.xml without info.plist file. Just add the following into your TiApp.xml (I put it under the </iphone> tag. Works on Android and iOS.

Quick Example of registering a scheme in TiApp.xml, implementing the code in app.js / alloy.js

@ericmoritz
ericmoritz / README.md
Last active December 17, 2015 14:19
attempt to find a easy to say domain

I wanted to find a domain that could easily be spelled without confusion.

@leolimajr
leolimajr / os-x-enable-trim.txt
Created November 21, 2012 11:10 — forked from clarencesong/os-x-enable-trim.md
Enable TRIM in OS X 10.8.2 for IOAHCIBlockStorage version 2.3.1
Enable TRIM on non-Apple SSDs in OS X 10.8.2 Mountain Lion.
WARNING: This is ONLY tested on 10.8.2 (IOAHCIBlockStorage version 2.3.1), and NOT earlier or later versions.
Check /System/Library/Extensions/IOAHCIFamily.kext/Contents/PlugIns/IOAHCIBlockStorage.kext/Contents/version.plist
Technical note: The driver changed in 10.8.2 and similar perl commands that worked in earlier OS X versions did not work for me once I updated to 10.8.2.
Run the following commands in Terminal…