Skip to content

Instantly share code, notes, and snippets.

@wesee
wesee / README.md
Last active January 11, 2019 20:37
Weatheroutlook Dashing Widget
@jk
jk / README.md
Last active April 27, 2018 18:02
Behat + Mink + Selenium 2 Stack

Important files

Here you find the DSL language definition for your phrases you can use in .feature files:

  • features/bootstrap/FeatureContext.php inherits from
  • vendor/behat/mink-extension/Behat/MinkExtension/Context/MinkContext.php

Installation

With Homebrew that gets really easy:

@tPl0ch
tPl0ch / CommandContext.php
Last active August 18, 2023 11:18
A CommandContext for Behat tests of Symfony Console Commands
<?php
namespace MFB\Behat\Subcontext;
use Behat\Gherkin\Node\PyStringNode;
use Behat\MinkExtension\Context\RawMinkContext;
use Symfony\Component\Console\Tester\CommandTester;
use Symfony\Component\EventDispatcher\EventDispatcher;
/**
anonymous
anonymous / getdashing.sh
Created May 11, 2014 09:13
#!/bin/sh
#@see https://gist.github.com/stonehippo/5896381
ECHO Get Dashing for Raspberry Pi
sudo apt-get update
sudo apt-get install git-core git build-essential libssl-dev zlib1g-dev nodejs
git clone https://github.com/joyent/node.git
cd node
git checkout v0.8.8 -b v0.8.8
curl https://github.com/joyent/node/commit/25c2940a08453ec206268f5e86cc520b06194d88.patch | git am
curl https://github.com/joyent/node/commit/1d52968d1dbd04053356d62dc0804bcc68deed8a.patch | git am
@dlage
dlage / convert_ploop_to_simfs.sh
Last active October 27, 2023 17:11
Bash script to convert an OpenVZ ploop container back to simfs
#!/bin/sh
# ./convert_ploop_to_simfs.sh VEID
# chmod +x convert_ploop_to_simfs.sh
rsync_options='-aHAX --progress --stats --numeric-ids --delete'
partition='vz'
if [ ! -e /etc/vz/conf/$1.conf ]; then
echo "Virtual server configuration file: /etc/vz/conf/$1.conf does not exist."
exit 1
fi
if [ ! -d /$partition/private/$1/root.hdd ]; then
@voduytuan
voduytuan / build.xml
Created September 19, 2015 05:18
Sample build.xml for apache Ant for php project
<?xml version="1.0" encoding="UTF-8"?>
<project name="Apitoy" default="full-build">
<!-- By default, we assume all tools to be on the $PATH -->
<property name="pdepend" value="/home/jenkins/vendor/bin/pdepend"/>
<property name="phpcpd" value="/home/jenkins/vendor/bin/phpcpd"/>
<property name="phpcs" value="/home/jenkins/vendor/bin/phpcs"/>
<property name="phploc" value="/home/jenkins/vendor/bin/phploc"/>
<property name="phpmd" value="/home/jenkins/vendor/bin/phpmd"/>
<property name="phpunit" value="/home/jenkins/vendor/bin/phpunit"/>
@jeffreymorganio
jeffreymorganio / uk-bounding-box.geojson
Created October 6, 2015 08:53
Longitude and latitude bounding box around the UK
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@euharrison
euharrison / 01composer.config
Created November 12, 2015 21:55
.ebextensions Laravel
commands:
01-update-composer:
command: export COMPOSER_HOME=/root && /usr/bin/composer.phar self-update
option_settings:
- namespace: aws:elasticbeanstalk:application:environment
option_name: COMPOSER_HOME
value: /root
container_commands:
@tianchaijz
tianchaijz / README.md
Created December 19, 2015 07:26 — forked from hwdsl2/.MOVED.md
IPsec L2TP VPN Auto Install Script for CentOS / RHEL 6 and 7

IPsec/L2TP VPN Auto Install Script for CentOS/RHEL

Script for automatic configuration of IPsec/L2TP VPN server on CentOS/RHEL 6 & 7 64-bit.
Works on dedicated servers or any KVM- or XEN-based Virtual Private Server (VPS).

It can also be used as the Amazon EC2 "user-data" with the official CentOS 7 AMI. Note that the official CentOS 6 AMI does NOT come with cloud-init, so you need to run this script manually after instance creation.

Alternative VPN script for Ubuntu/Debian
Original post by Thomas Sarlandie

@AlexR1712
AlexR1712 / bladeCompile.php
Last active December 5, 2022 07:20
Compile a string like Blade Template in Laravel
<?php
// Only you need to add in your controller.
public function bladeCompile($value, array $args = array())
{
$generated = \Blade::compileString($value);
ob_start() and extract($args, EXTR_SKIP);
// We'll include the view contents for parsing within a catcher
// so we can avoid any WSOD errors. If an exception occurs we