Skip to content

Instantly share code, notes, and snippets.

Avatar

Mukke DarkMukke

View GitHub Profile
View stationeers clock instruction
probably the same amount of components, just simple
Also you could display the hours and minutes on 2 different displays
;; I have used long variable names to reduce confusion,
;; daylightSensorDegrees integer (0 -> 180 and back after midnight)
;; daylightSensorVisible integer ( 0 || 1)
View CustomSort.php
<?php
/**
* @license MIT
* @author Ruben Decleyn mukke@tbs-dev.co.uk>
* @created 12/02/2017
*/
namespace App\TwigExtensions;
View magento_oneliner_db_dump.sh
config="app/etc/local.xml"; u=`sed -n 's/.*<username><!\[CDATA\[\(.*\)]]><\/username>/\1/p' $config`;n=`sed -n 's/.*<dbname><!\[CDATA\[\(.*\)]]><\/dbname>/\1/p' $config`;p=`sed -n 's/.*<password><!\[CDATA\[\(.*\)]]><\/password>/\1/p' $config`;mysqldump -u $u -p"${p}" $n > ~/${n}_$(date +"%Y_%m_%d")
View iniLoop.sh
#!/usr/bin/env bash
#
# # # example.ini
# [goedhuis-dev]
# USER = juno
# HOST = gh.juno.is
#
# [goedhuis-stag]
# USER = juno
@DarkMukke
DarkMukke / gist:4127528
Created Nov 21, 2012
Sub layouts in Yii
View gist:4127528
#file : overall.php
<html>
<head> <title> stuff </title> </head>
<body>
<header>
this is my header
</header>
<?php echo $content; ?>
@DarkMukke
DarkMukke / gist:4125716
Created Nov 21, 2012
Load config file in Yii modules
View gist:4125716
class BlehModule
{
public __construct()
{
$conf = include "thefile.php";
$this->config($conf);
}
You can’t perform that action at this time.