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() { | |
// Remove placeholders on focus | |
$("input, textarea").focus(function() { | |
var placeholder = $(this).attr('placeholder'); | |
if (placeholder !== '') { | |
$(this).attr('placeholder', ''); | |
$(this).attr('data-placeholder', placeholder); | |
} else { | |
$(this).attr('placeholder', placeholder); |
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
location / { | |
root /path/to/laravel/public; | |
index index.php; | |
if (!-e $request_filename) | |
{ | |
rewrite ^/(.*)$ /index.php?/$1 last; | |
break; | |
} |
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
# Things will be here... Trust me! |
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 | |
class myApp extends wxApp | |
{ | |
function pushBut() | |
{ | |
exit('sdfsdf'); | |
} | |
function OnInit() | |
{ |
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 | |
curl -sS https://getcomposer.org/installer | php -- --install-dir=/tmp | |
/tmp/composer.phar global require composer/composer | |
echo '# Composer' >> ~/bash_profile | |
echo 'export PATH=~/.composer/vendor/bin:$PATH' >> ~/.bash_profile | |
rm /tmp/composer.phar | |
echo 'Composer installed globally.' | |
echo "You can now install global packages by running 'composer global require vendor/package'" |
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/sh | |
# Starts, stops, and restarts Apache Solr. | |
# | |
# chkconfig: 35 92 08 | |
# description: Starts and stops Apache Solr | |
SOLR_DIR="/var/solr" | |
JAVA_OPTIONS="-Xmx1024m -DSTOP.PORT=8079 -DSTOP.KEY=mustard -jar start.jar" | |
LOG_FILE="/var/log/solr.log" |
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 | |
if [ "${VARIABLE}" = "1" ]; then | |
echo "This is a pull request, nothing to deploy" | |
exit | |
fi | |
echo skulpin-test.chrisnharvey.com > ./output_prod/CNAME | |
cd ./output_prod |
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 | |
locale-gen | |
ln -s /usr/share/zoneinfo/Europe/London /etc/localtime | |
pacman -S --noconfirm grub-bios | |
grub-install /dev/sda |
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
var WebTorrent = require('webtorrent') | |
var fs = require('fs') | |
var client = new WebTorrent() | |
var magnetURI = 'test.torrent' | |
client.download(magnetURI, function (torrent) { | |
// Got torrent metadata! | |
console.log('Torrent magnet link:', torrent.magnetURI) |
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 | |
LOGFILE="/var/log/clamav/clamav-$(date +'%Y-%m-%d').log"; | |
EMAIL_MSG="Please see the log file attached."; | |
EMAIL_FROM="server1@xxx.com"; | |
EMAIL_TO="servers@xxx.co.uk"; | |
DIRTOSCAN="/srv"; | |
for S in ${DIRTOSCAN}; do | |
DIRSIZE=$(du -sh "$S" 2>/dev/null | cut -f1); |
OlderNewer