Skip to content

Instantly share code, notes, and snippets.

@pjobson
pjobson / pike_it.md
Last active March 14, 2024 01:56
Asus Pike 2008 IT Mode Cross Flash

Flashing Asus 2008 PIKE to IT Mode

Used on an Asus Z8PE-D18 board with no EFI boot options. These instructions were written using Linux Mint to create the media, most distributions will work with little modification.

The PIKE 2008 is basically a LSI 9220-8i which you can flash with 9211-8i firmware. Flashing to IT mode allows you to have direct access to the disks to use btrfs or zfs or some kind of software RAID instead of the card's RAID.

Get Your SAS Address

There is a sticker on the back of your PIKE card which has 16 digits starting with 5000. Write this address down or take a picture of it. Note I put XXXXXXXXXXXX in this picture as these numbers are unique to the card. If your card does not have this sticker, instructions will be provided below.

@bummzack
bummzack / FixedImagickBackend.php
Created November 10, 2016 22:36
Image magick SilverStripe
<?php
/**
* Add missing "crop" method to ImagickBackend, so that it works with the focuspoint module
*/
if(class_exists('Imagick')) {
class FixedImagickBackend extends ImagickBackend
{
public function crop($top, $left, $width, $height)
{
@DragonBe
DragonBe / mikko_test.md
Created August 9, 2016 12:20
Simple test for PHP development skill evaluation (orig. created by Mikko Koppanen)

The assignment (max 1h30): Salary Payment Date tool

This assignment gives us a good understanding about the thought-process and the capabilities of the developer. This doesn’t have to be a rock-solid, highly scalable super fancy production-ready application, but just something that allows us to get an idea of the developer's skills and level.

Try to keep things simple. If frameworks, libraries or databases are needed to write the application, please mention them and the arguments why they were required in the documentation for this assignment.

NOTE: This is a sample code and will only be used for evaluation purposes

Requirements:

@Zauberfisch
Zauberfisch / BaseValidator.php
Last active August 29, 2015 14:13
Better SilverStripe Form Validator
<?php
/**
* @author zauberfisch
*/
class BaseValidator extends Validator {
protected $validateFields, $requireFields;
/**
* @param bool|string[]|\FormField[]|\FieldList $validateFields
@gladiatr72
gladiatr72 / ovirtlay.connect.py
Created August 29, 2014 20:44
Example of ovirt-sdk creating a guest using cloud-init features (authorized_keys and root password update)
#!/usr/bin/python python
import threading
from ovirtsdk.api import API
from ovirtsdk.xml import params
from ovirtsdk.infrastructure.errors import (NoCertificatesError,
ImmutableError,
RequestError,
ConnectionError,
MissingParametersError)
@niraj-shah
niraj-shah / fb_tab_app_4.0.x.php
Last active January 22, 2024 11:42
Creating a Facebook Page Tab App using the Facebook PHP SDK 4.0.x
<?php
// required Facebook PHP SDK v4.0.9 or later.
// include required files form Facebook SDK
require_once( 'Facebook/HttpClients/FacebookHttpable.php' );
require_once( 'Facebook/HttpClients/FacebookCurl.php' );
require_once( 'Facebook/HttpClients/FacebookCurlHttpClient.php' );
require_once( 'Facebook/Entities/AccessToken.php' );
require_once( 'Facebook/Entities/SignedRequest.php' );
@Zauberfisch
Zauberfisch / TranslatableControllerExtension.php
Last active December 23, 2015 13:41
SilverStripe Translatable defaults snippets
<?php
// file: mysite/code/TranslatableControllerExtension.php
class TranslatableControllerExtension extends Extension {
/**
* save the current controller to ensure we have access to it,
* this is necessary because Security crates a fake Page_Controller to render templates
* @var Controller
*/
protected static $actual_current_controller;
@svandragt
svandragt / DateRange.php
Created February 25, 2014 14:16
DateRange class: Quickly find overlaps with other date ranges
<?php
/**
* Class to make it easier to compare date ranges (where range is between start date and end date)
*/
class DateRange {
public $StartDate = null;
public $EndDate = null;
/**
@toolmantim
toolmantim / Makefile
Last active December 5, 2022 23:14
An example of using Make instead of Grunt for fast, simple and maintainable front-end asset compilation.
# A simple Makefile alternative to using Grunt for your static asset compilation
#
## Usage
#
# $ npm install
#
# And then you can run various commands:
#
# $ make # compile files that need compiling
# $ make clean all # remove target files and recompile from scratch
@zachleat
zachleat / gist:5407068
Last active December 16, 2015 08:39
Differences between Pure Internet Explorers and IE Compatibility Modes

Or, yet more evidence that you should use feature detection instead of browser/user agent sniffing.

IE9

Not supported in IE9 but works in IE10-as-IE9

  • Unprefixed CSS transform. Should require -ms-transform but doesn’t require it.

IE8