Skip to content

Instantly share code, notes, and snippets.

View meigwilym's full-sized avatar

Mei Gwilym meigwilym

View GitHub Profile
@meigwilym
meigwilym / jq-mobile-green-button-theme.css
Created March 1, 2012 23:12 — forked from mastergizmo/jq-mobile-green-button-theme.css
jQuery Mobile Green Theme for Buttons
.ui-btn-up-g, .ui-btn-hover-g, .ui-btn-down-g
{
color: white;
font-weight: bold;
text-decoration: none;
}
.ui-btn-up-g a.ui-link-inherit {
color: #fff;
}
@meigwilym
meigwilym / macros
Created April 3, 2014 09:14 — forked from mnshankar/macros
<?php
/*********************************************************************************************
* Example usage (In view)
* <div class="welcome">
<?php echo Form::open(array('route'=>'process','class'=>'form-horizontal'))?>
<?php echo Form::textField('first_name')?>
<?php echo Form::textField('last_name')?>
<?php echo Form::emailField('email')?>
<?php echo Form::passwordField('password')?>
<?php echo Form::selectField('select_one', array('1'=>'abc', '2'=>'def'))?>
@meigwilym
meigwilym / config.yaml
Created December 23, 2016 09:47
Puphpet config YAML file
vagrantfile:
target: local
vm:
provider:
local:
box: puphpet/centos7-x64
box_url: puphpet/centos7-x64
box_version: '0'
chosen_virtualizer: virtualbox
virtualizers:
@meigwilym
meigwilym / laravel-check.php
Created April 5, 2018 13:20
A PHP file that checks that your server is compatible with Laravel 5.6's requirements.
<?php
$phpversionok = false;
if(PHP_VERSION_ID >= 70103) {
$phpversionok = true;
}
$exts = ['openssl', 'pdo', 'mbstring', 'tokenizer', 'xml', 'ctype', 'json'];
$extsNotloaded = [];
foreach($exts as $i => $extension) {
@meigwilym
meigwilym / example.conf
Last active May 9, 2018 10:03
Install a web server and separate database server for Wordpress
server {
# certbot uses this to verify the SSL request
location ^~ /.well-known/acme-challenge/ {
default_type "text/plain";
root /var/www/letsencrypt;
}
}
@meigwilym
meigwilym / readme.md
Last active July 6, 2018 12:45
Using Adminator in Laravel

Using Adminator in Laravel

Adminator is not that friendly to be dropped in a Laravel project. Here's what I did to get the CSS and fonts working.

Using Laravel 5.6 and Adminator

@meigwilym
meigwilym / acenion.md
Last active August 31, 2018 10:24
Acenion y Gymraeg

Pob llythyren acenog yn y Gymraeg.

Mae'r degol, hex a named ar gyfer dogfennau html.

Llythyren Côd Disgrifiad Decimal Hex Named
 U+00C2 LATIN CAPITAL LETTER A WITH CIRCUMFLEX &#194; &#xc2; &Acirc;
â U+00E2 LATIN SMALL LETTER A WITH CIRCUMFLEX &#226; &#xe2; &acirc;
Ê U+00CA LATIN CAPITAL LETTER E WITH CIRCUMFLEX &#202; &#xca; &Ecirc;
ê U+00EA LATIN SMALL LETTER E WITH CIRCUMFLEX &#234; &#xea; &ecirc;
@meigwilym
meigwilym / readme.md
Last active September 26, 2018 09:31
Use array functions rather than loops for JSON objects

Use array functions rather than loops for JSON objects

Take this array of tag objects for example.

const tags = [
	{
		name: 'Studio',
		id: 'studio',
 url: '/tags/studio'
@meigwilym
meigwilym / readme.md
Created October 1, 2018 08:30
Configuring WPA2 Wifi on a Raspberry Pi

I had real trouble connecting my Raspberry Pis (v3 Model Bs) to a WPA Enterprise network.

Here's what I did to get it to work.

For this example, my wifi network name is "WiFi Network", usernames and passwords have also been swapped out. The Wifi Country is GB.

Wifi

Edit /etc/wpa_supplicant/wpa_supplicant.conf with the following (using your "real" password):

@meigwilym
meigwilym / readme.md
Last active October 30, 2018 12:26
UK Quake Alerts