Skip to content

Instantly share code, notes, and snippets.

Changing serial settings was 0/0 now 3/0
Start bios (version 1.7.2-20150226_170051-google)
Unable to unlock ram - bridge not found
Ram Size=0xc0000000 (0x0000000120000000 high)
Relocating low data from 0x000e5810 to 0x000ef780 (size 2161)
Relocating init from 0x000e6081 to 0xbffd3540 (size 51612)
CPU Mhz=2301
=== PCI bus & bridge init ===
PCI: pci_bios_init_bus_rec bus = 0x0
=== PCI device probing ===
#!/bin/bash
adb reboot bootloader
echo "Press a key once your device says bootloader in the bottom right..."
read -n 1 -s
fastboot oem append-cmdline "androidboot.unlocked_kernel=true"
sleep(8)
fastboot continue
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title></title>
<style type='text/css'>
ul { list-style: none; }
#recordingslist audio { display: block; margin-bottom: 10px; }
</style>
#!/usr/bin/env bash
###
# Check that we have the correct working directory.
###
if [ ! -d "web" ]
then
echo "Please run this script from the main web directory."
exit
fi
@dblencowe
dblencowe / deploy.sh
Created May 8, 2016 09:33
Deploy Bedrock sites to a standard Wordpress install using Git and Continuous Integration
#!/usr/bin/env bash
###
# Check that we have the correct working directory.
###
if [ ! -d "web" ]
then
echo "Please run this script from the main web directory."
exit
fi
@dblencowe
dblencowe / AnchorCmsValetDriver.php
Created May 14, 2016 10:09
Anchor CMS driver for Valet from Laravel
<?php
class AnchorCmsValetDriver extends ValetDriver
{
/**
* Determine if the driver serves the request.
*
* @param string $sitePath
* @param string $siteName
* @param string $uri
@dblencowe
dblencowe / SilexServerValetDriver.php
Created September 8, 2016 14:52
A Laravel Valet Driver for running Silex installations
<?php
class SilexServerValetDriver extends ValetDriver
{
/**
* Determine if the driver serves the request.
*
* @param string $sitePath
* @param string $siteName
* @param string $uri
@dblencowe
dblencowe / update-ip.sh
Created January 9, 2017 10:33
Get a public IP and write it to /etc/hosts
#!/usr/bin/env bash
IP=`aws ec2 describe-instances --profile lfc-staging --filters "Name=tag:machinetype,Values=web" | grep -m 1 PrivateIpAddress | grep -o '[0-9]\{1,3\}\.[0-9]\{1,3\}\.[0-9]\{1,3\}\.[0-9]\{1,3\}'`
sed -i -e "s/.*lfc-staging$/$IP lfc-staging/g" /etc/hosts
@dblencowe
dblencowe / download-humble-bundle.js
Created June 1, 2017 06:44
Download all ebooks from Humble Bundle
# Paste in to console when on download page
$('a').each(function(i){
if ($.trim($(this).text()) == 'MOBI' || $.trim($(this).text()) == 'PDF' || $.trim($(this).text()) == 'EPUB') {
$('body').append('<iframe id="dl_iframe_'+i+'" style="display:none;">');
document.getElementById('dl_iframe_'+i).src = $(this).data('web');
}
});

Coding standards

It's really important to follow the guidelines, it saves lots of times when checking PR's...

For php coding guidelines we use this:

Naming conventions

  • use camelCase for variables (ex. $numberOfColumns)
  • use underscores in column names (ex. @ORM\Column(name="number_of_columns"))