Skip to content

Instantly share code, notes, and snippets.

View lukesUbuntu's full-sized avatar
🚀
code all day every day & code in my sleep..... zzzz

Luke Hardiman lukesUbuntu

🚀
code all day every day & code in my sleep..... zzzz
View GitHub Profile
@lukesUbuntu
lukesUbuntu / blesta
Created March 24, 2015 10:56
blesta jquery ajax loading example
$.ajax({
method: 'GET',
url: data,
success: function(data) {
$("#package-config").html(data);
},
beforeSend: function() {
$("#package-config").append($(this).blestaLoadingDialog());
},
complete: function() {
#Mail gun postfix relay
relayhost = [smtp.mailgun.org]:587
smtp_sasl_auth_enable = yes
smtp_sender_dependent_authentication = yes
smtp_sasl_auth_enable = yes
#use hash map file etc but for now testing
smtp_sasl_password_maps = static:username@usernam.co.nz:password
smtp_sasl_security_options = noanonymous
@lukesUbuntu
lukesUbuntu / querycall.php
Created October 3, 2015 03:57
query url call example for possible sql
<?php
/**
* Created by PhpStorm.
* User: 9901623
* Date: 3/10/2015
* Time: 4:32 PM
*/
//words
@lukesUbuntu
lukesUbuntu / CDN Kit
Created February 7, 2016 11:45 — forked from 0frasure/CDN Kit
CDN Kit
<!-- Bootstrap -->
<link href="//maxcdn.bootstrapcdn.com/bootstrap/3.3.2/css/bootstrap.min.css" rel="stylesheet">
<script src="//maxcdn.bootstrapcdn.com/bootstrap/3.3.2/js/bootstrap.min.js"></script>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4/jquery.min.js"></script>
<!-- Font Awesome -->
<link href="//maxcdn.bootstrapcdn.com/font-awesome/4.3.0/css/font-awesome.min.css" rel="stylesheet">
<!-- Bootlint-->
<script src="//maxcdn.bootstrapcdn.com/bootlint/0.11.0/bootlint.min.js"></script>
@lukesUbuntu
lukesUbuntu / extend.sh
Created March 23, 2016 00:24 — forked from wvengen/extend.sh
Extend non-HiDPI external display above HiDPI internal display
#!/bin/sh
# extend non-HiDPI external display on DP* above HiDPI internal display eDP*
# see also https://wiki.archlinux.org/index.php/HiDPI
# you may run into https://bugs.freedesktop.org/show_bug.cgi?id=39949
# https://bugs.launchpad.net/ubuntu/+source/xorg-server/+bug/883319
EXT=`xrandr --current | sed 's/^\(.*\) connected.*$/\1/p;d' | grep -v ^eDP | head -n 1`
INT=`xrandr --current | sed 's/^\(.*\) connected.*$/\1/p;d' | grep -v ^DP | head -n 1`
ext_w=`xrandr | sed 's/^'"${EXT}"' [^0-9]* \([0-9]\+\)x.*$/\1/p;d'`
@lukesUbuntu
lukesUbuntu / npmpermfix.sh
Created August 21, 2016 00:49
EACCES: permission denied | npm You don't have access to this file fix
sudo chown -R $USER:$GROUP ~/.npm
sudo chown -R $USER:$GROUP ~/.config
sudo chown -R $USER:$GROUP ~/.cache
@lukesUbuntu
lukesUbuntu / proftp fix.txt
Created August 23, 2016 07:29
fix proftp stopping service in virtualmin
The problem is due to ProFTPD not stopping in time to be restarted for log rotation
Woraround
nano /etc/init.d/proftpd
Find this line:
start-stop-daemon --stop --signal $SIGNAL --quiet --pidfile "$PIDFILE"
@lukesUbuntu
lukesUbuntu / install_sshpass.sh
Created November 16, 2016 01:50
Install sshpass on mac osx
brew install http://git.io/sshpass.rb
@lukesUbuntu
lukesUbuntu / fix.sh
Last active December 26, 2016 08:51
fix for Error opening terminal: xterm-new.
#add to profile or just run
export TERM=xterm
@lukesUbuntu
lukesUbuntu / wholesalesms.php
Created April 8, 2017 06:11
basic wholesalesms class for sending txt messages
<?php
class wholesalesms {
var $api_key;
var $secret;
var $end_point;
public function wholesalesms($api_key,$secret,$end_point = 'https://app.wholesalesms.com.au/api/v2/'){
$this->api_key = $api_key;
$this->secret = $secret;
$this->end_point = $end_point;