Skip to content

Instantly share code, notes, and snippets.

View allaniftrue's full-sized avatar

Tux allaniftrue

  • 20:19 (UTC +08:00)
View GitHub Profile
@allaniftrue
allaniftrue / route.php
Last active December 20, 2016 09:21
Using Omnipay Paypal With Laravel Route
<?php
Route::get('', array(
'as' => 'home',
'uses' => 'BaseController@getIndex'
)
);
Route::post('pay_via_paypal', 'PaymentController@postPayment');
Route::get('payment_success', 'PaymentController@getSuccessPayment');
Route::get('cancel_order', function() {
@allaniftrue
allaniftrue / app.php
Last active December 20, 2016 09:21
Using Omnipay Paypal With Laravel App Configuration
<?php
return array(
'providers' => array(
'Ignited\LaravelOmnipay\LaravelOmnipayServiceProvider'
),
'aliases' => array(
'Omnipay' => 'Ignited\LaravelOmnipay\Facades\OmnipayFacade'
)
);
@allaniftrue
allaniftrue / composer.json
Created August 6, 2014 08:15
Using Omnipay Paypal With Laravel Composer JSON File
"require": {
"laravel/framework": "4.2.*",
"omnipay/common": "~2.3.0",
"ignited/laravel-omnipay": "1.*",
"omnipay/paypal": "*"
},
"autoload": {
"psr-0": {
"Ignited\\LaravelOmnipay": "src/"
}
@allaniftrue
allaniftrue / countdown.js
Last active August 29, 2015 14:05 — forked from dleatherman/countdown.js
Deprecation updates for moment.js v2.8.1
$(document).ready(function(){
countdown();
setInterval(countdown, 1000);
function countdown () {
var now = moment(), // get the current moment
// May 28, 2013 @ 12:00AM
then = moment([2014, 9, 20]),
// get the difference from now to then in ms
ms = then.diff(now, 'milliseconds', true);
// If you need years, uncomment this line and make sure you add it to the concatonated phrase
@allaniftrue
allaniftrue / cron
Created December 30, 2014 23:40
Gnooki SMSD Cronjob
# Exec cmd every 5 minutes
*/5 * * * * /home/pi/bin/smsgateway >/dev/null 2>&1
#where smsgateway
#!/bin/bash
#Script used to run gnokii smsd
/usr/sbin/smsd -u root -p mySQLPassword -d smsgw -c localhost -m mysql -b IN -f /var/log/smsdaemon.log
@allaniftrue
allaniftrue / sms.tables.mysql.sql
Last active August 29, 2015 14:12
SMSD mysql Gist
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
CREATE TABLE `contact` (
`id` int(255) unsigned NOT NULL AUTO_INCREMENT,
`user_id` int(10) unsigned NOT NULL,
`name` varchar(50) DEFAULT NULL,
`number` varchar(20) NOT NULL DEFAULT '',
PRIMARY KEY (`id`),
KEY `user_id` (`user_id`)
@allaniftrue
allaniftrue / nginx
Created January 18, 2015 14:16
Nginx ARM compilation from source
./configure --prefix=/etc/nginx --conf-path=/etc/nginx/nginx.conf --error-log-path=/var/log/nginx/error.log --http-client-body-temp-path=/var/lib/nginx/body --http-fastcgi-temp-path=/var/lib/nginx/fastcgi --http-log-path=/var/log/nginx/access.log --http-proxy-temp-path=/var/lib/nginx/proxy --lock-path=/var/lock/nginx.lock --pid-path=/var/run/nginx.pid --with-http_gzip_static_module --with-http_ssl_module --with-ipv6 --without-http_browser_module --without-http_geo_module --without-http_limit_req_module --without-http_limit_conn_module --without-http_map_module --without-http_memcached_module --without-http_referer_module --without-http_scgi_module --without-http_split_clients_module --without-http_ssi_module --without-http_userid_module --without-http_uwsgi_module
@allaniftrue
allaniftrue / gnokiirc
Created January 18, 2015 14:49
Gnokii Configuration
# This is a sample ~/.gnokiirc file. Copy it into your
# home directory and name it .gnokiirc.
# See http://wiki.gnokii.org/index.php/Config for working examples.
#
[global]
port = 00:11:22:33:44:55
model = 6510
initlength = default
@allaniftrue
allaniftrue / ngrok
Created January 18, 2015 15:00
Ngrok init cript
#! /bin/sh
### BEGIN INIT INFO
# Provides: ngrok
# Required-Start: $remote_fs $syslog
# Required-Stop: $remote_fs $syslog
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: ngrok initscript
# Description: This file should be used to construct scripts to be
# placed in /etc/init.d.
@allaniftrue
allaniftrue / .ngrok
Created January 18, 2015 15:03
Ngrok YAML Config
auth_token: "seMQ8Pb4bMXY"
tunnels:
myChosenSubDomain:
proto:
http: 80
ssh:
remote_port: 61813
proto:
tcp: 22