This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const fs = require('fs'); | |
const readline = require('readline'); | |
const rl = readline.createInterface({ | |
input: process.stdin, | |
output: process.stdout | |
}); | |
// Load the participants and questions from the files. | |
fs.readFile('participants.txt', 'utf8', (err, participantsData) => { | |
if (err) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
^(master|pr\/[0-9]+)$ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Create a DSN string from a configuration. | |
* | |
* @param array $config | |
* @return string | |
*/ | |
protected function getDsn(array $config) | |
{ | |
// First we will create the basic DSN setup as well as the port if it is in |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Create a Carbon instance from a specific format. | |
* | |
* @param string $format | |
* @param string $time | |
* @param \DateTimeZone|string|null $tz | |
* | |
* @throws \InvalidArgumentException | |
* | |
* @return static |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sed -i "s/RELEASE=.*/RELEASE=$(git log --pretty="%h" -n1 HEAD)/" .env |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { NgModule } from '@angular/core'; | |
... | |
import { environment } from '../environments/environment'; | |
@NgModule({ | |
... | |
providers: [{ | |
provide: LocationStrategy, | |
useClass: environment.production ? PathLocationStrategy : HashLocationStrategy, | |
}], |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Modified version of | |
# http://dtucker.co.uk/hack/bypassing-the-memory-check-on-a-vmware-esxi-5.html | |
# Boot the system from USB Stick / CD with ESXi installer on it. | |
# Once the installer welcome screen shows up, press ALT+F1 | |
# Login as "root", no password. | |
cd /usr/lib/vmware/weasel/util | |
mv upgrade_precheck.pyc upgrade_precheck.pyc.old | |
cp upgrade_precheck.py upgrade_precheck.py.old | |
chmod 666 upgrade_precheck.py.old |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
wget http://download.gna.org/wkhtmltopdf/0.12/0.12.2.1/wkhtmltox-0.12.2.1_linux-trusty-amd64.deb | |
sudo apt-get update | |
sudo apt-get install wkhtmltox | |
sudo apt-get -f install | |
sudo dpkg -i wkhtmltox-0.12.2.1_linux-trusty-amd64.deb | |
wkhtmltopdf -V | |
rm wkhtmltox-0.12.2.1_linux-trusty-amd64.deb |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function getLevels($cEXP) { | |
for($i = 1; ($i * $i + 2) * $i <= $cEXP; $i++); | |
return $i; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php namespace App\Libraries; | |
use DB; | |
class Slug { | |
// Create a unique slug | |
static function make($name, $table = null, $column = null) | |
{ | |
$valid = false; |
NewerOlder