Skip to content

Instantly share code, notes, and snippets.

ando dre1080

Block or report user

Report or block dre1080

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View semantic-commit-messages.md

Semantic Commit Messages

See how a minor change to your commit message style can make you a better programmer.

Format: <type>(<scope>): <subject>

<scope> is optional

Example

@dre1080
dre1080 / Contract Killer 3.md
Last active Oct 22, 2018 — forked from malarkey/Contract Killer 3.md
The latest version of my ‘killer contract’ for web designers and developers
View Contract Killer 3.md

Contract Killer

The popular open-source contract for web professionals by Stuff & Nonsense

  • Originally published: 23rd December 2008
  • Revised date: March 15th 2016
  • Original post

@dre1080
dre1080 / parse_dotenv.bash
Created Oct 15, 2018 — forked from judy2k/parse_dotenv.bash
Parse a .env (dotenv) file directly using BASH
View parse_dotenv.bash
# Pass the env-vars to MYCOMMAND
eval $(egrep -v '^#' .env | xargs) MYCOMMAND
# … or ...
# Export the vars in .env into your shell:
export $(egrep -v '^#' .env | xargs)
@dre1080
dre1080 / docker.cadvisor.service
Last active Jun 6, 2018 — forked from pa-re/docker.cadvisor.service
/etc/systemd/system/docker.cadvisor.service
View docker.cadvisor.service
sudo docker create \
-v /:/rootfs:ro \
-v /var/run:/var/run:rw \
-v /sys:/sys:ro \
-v /var/lib/docker/:/var/lib/docker:ro \
-p 49876:8080 \
-m 50M \
--cpus 0.25 \
--cpuset-cpus 1 \
--name=cadvisor \
@dre1080
dre1080 / libimobiledevice_ifuse_Ubuntu.md
Created Mar 5, 2018 — forked from samrocketman/libimobiledevice_ifuse_Ubuntu.md
On Ubuntu 16.04, since iOS 10 update, libimobiledevice can't connect to my iPhone. This is my attempt to document a fix.
View libimobiledevice_ifuse_Ubuntu.md

Why this document?

I upgraded my iPhone 5s to iOS 10 and could no longer retrieve photos from it. This was unacceptable for me so I worked at achieving retrieving my photos. This document is my story (on Ubuntu 16.04).

The solution is to compile libimobiledevice and ifuse from source.

Audience

Who is this guide intended for?

@dre1080
dre1080 / api.php
Created May 16, 2017
Disable WordPress REST API endpoints
View api.php
// Remove init rest routes
remove_action( 'rest_api_init', 'create_initial_rest_routes', 0 );
// Remove oembed rest routes
function remove_json_api () {
// Remove the REST API lines from the HTML Header
remove_action( 'wp_head', 'rest_output_link_wp_head', 10 );
remove_action( 'wp_head', 'wp_oembed_add_discovery_links', 10 );
@dre1080
dre1080 / dev-tld.md
Created Sep 27, 2016 — forked from marek-saji/dev-tld.md
Configure local DNS server to serve #dev #TLD #ubuntu #linux
View dev-tld.md

Configure local wildcard DNS server

  1. Install Dnsmasq: sudo apt-get install dnsmasq
  2. Since Ubuntu's NetworkManager uses dnsmasq, and since that messes things up a little for us, open up /etc/NetworkManager/NetworkManager.conf and comment out (#) the line that reads dns=dnsmasq. Restart NetworkManager afterwards: sudo restart network-manager.
  3. Make sure Dnsmasq listens to local DNS queries by editing /etc/dnsmasq.conf, and adding the line listen-address=127.0.0.1.
  4. Create a new file in /etc/dnsmasq.d (eg. /etc/dnsmasq.d/dev), and add the line address=/dev/127.0.0.1 to have dnsmasq resolve requests for *.dev domains. Restart Dnsmasq: sudo /etc/init.d/dnsmasq restart.

source: http://brunodbo.be/blog/2013/04/setting-up-wildcard-apache-virtual-host-wildcard-dns

View box-shadow.html
<!DOCTYPE html>
<html>
<head>
<title>Box Shadow</title>
<style>
.box {
height: 150px;
width: 300px;
margin: 20px;
You can’t perform that action at this time.