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
let cliche_quote = ' Nice! '; | |
$('.compare-cutoff').textContent = $('.compare-cutoff').textContent.replace('big!', `big! ${cliche_quote}`); |
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
func generate_voronoi_diagram(imgSize : Vector2, num_cells: int): | |
var img = Image.new() | |
img.create(imgSize.x, imgSize.y, false, Image.FORMAT_RGBH) | |
var points = [] | |
var colors = [] | |
for i in range(num_cells): | |
points.push_back(Vector2(int(randf()*img.get_size().x), int(randf()*img.get_size().y))) |
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
#!/usr/bin/env bash | |
#Usage docker-machine-update-hosts.sh hosts.conf default | |
#arg1 is a configuration file with hosts | |
#arg2 is the docker-machine name e.g. default | |
DOCKER_IP=$(docker-machine ip $2) | |
echo "$2 ip: $DOCKER_IP" | |
#Remove existing lines from hosts | |
while IFS='' read -r line || [[ -n "$line" ]]; do |
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 | |
$config = \SimpleSAML_Configuration::getInstance(); | |
$red = new \SimpleSAML\Store\Redis(); | |
$conf = array( | |
'host' => $config->getString('store.redis.host', 'localhost'), | |
'port' => $config->getInteger('store.redis.port', 6379), | |
'prefix' => $config->getString('store.redis.prefix', 'SimpleSAMLphp'), | |
'scheme' => 'tcp', | |
); |
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
#!/usr/bin/env node | |
// Define hook in your config <hook src="scripts/cordova-google-services-version-gradle-fix.js" type="before_prepare" /> | |
var sourceDir = ''; | |
var platformDir = 'platforms/android'; | |
var fs = require('fs'); | |
var path = require('path'); | |
var readline = require("readline"); |
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
$aliases['loc'] = array ( | |
// This is the full site alias name from which we inherit its config. | |
'parent' => '@docker.loc' //alias name, | |
'uri' => 'docker.loc' //Drupal URL, | |
'root' => '/var/www/' //Drupal full path on disk, | |
'ssh-options' => '-p 2222', | |
'remote-host' => '192.168.99.100' //DOCKER/DOCKER MACHINE IP, | |
); |
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
#$1 is url | |
#$2 is cookie file | |
curl -I -b $2 -c $2 $1 > /tmp/vtest | |
echo 'Varnish Enabled: ' | |
grep -i 'Via.?varnish' < /tmp/vtest | |
echo 'Varnish Hit: ' | |
grep -i 'X-Cache:.HIT' < /tmp/vtest |
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
#!/bin/bash | |
# PHP CodeSniffer CI Task | |
# | |
# Based off of git pre-commit hook | |
# https://github.com/s0enke/git-hooks/tree/master/phpcs-pre-commit | |
# | |
# Export Variables to be set by CI Agent / Bot | |
# PHPCS_BIN=/usr/bin/phpcs | |
# PHPCS_CODING_STANDARD=PEAR | |
# PHPCS_IGNORE= |
NewerOlder