Skip to content

Instantly share code, notes, and snippets.

View YOzaz's full-sized avatar

Marijus Plančiūnas YOzaz

View GitHub Profile
<?php namespace MyApp\Utils\MailChimp;
use MyApp\Utils\FacebookAdsRepository;
class MailChimpService
{
/**
* @var FacebookAdsRepository
*/
protected $facebook;
<?php namespace MyApp\Utils\MailChimp;
use \Illuminate\Support\Facades\Facade;
/**
* Facade class to be called whenever the class UserService is called
*/
class MailChimpFacade extends Facade {
/**
<?php namespace MyApp\Utils\MailChimp;
use Illuminate\Support\ServiceProvider;
/**
* Register our Services with Laravel
*/
class MailChimpServiceProvider extends ServiceProvider
{
protected function register()
<?php namespace MyApp\Controllers\Mailer;
use MailChimpAPI;
class MailChimpController extends \Controller
{
/**
* Syncs MailChimp data
*
* @throws \Exception
var gulp = require('gulp');
var concat = require('gulp-concat');
var ngAnnotate = require('gulp-ng-annotate');
var plumber = require('gulp-plumber');
gulp.task('app', function() {
return gulp.src(['public/app/**/app.js', 'public/app/**/*.module.js', 'public/app/**/*.js'])
.pipe(plumber())
.pipe(concat('app.js', {newLine: ';'}))
.pipe(ngAnnotate({add: true}))
var uglify = require('gulp-uglify');
var bytediff = require('gulp-bytediff');
var rename = require('gulp-rename');
gulp.task('prod', ['app'], function() {
return gulp.src('public/src/app.js')
.pipe(plumber())
.pipe(bytediff.start())
.pipe(uglify({mangle: true}))
.pipe(bytediff.stop())
gulp.task('watch', ['prod'], function () {
return gulp.watch('public/app/**/*.js', ['prod']);
});
gulp.task('default', ['watch', 'app']);
@YOzaz
YOzaz / detect.js
Last active October 14, 2015 11:07
if (/Android|webOS|iPhone|iPod|iPad|BlackBerry|Nokia/i.test( navigator.userAgent )) {
if ( bottomStickyBanner.length != 0 ) {
var BSBisBannerAttached = true;
var BSBviewScale = new FlameViewportScale();
var BSBscrollHandler = function (event) {
@YOzaz
YOzaz / Yourls.php
Last active October 30, 2015 10:53
<?php namespace App\Services;
use \Pest;
class Yourls
{
/** @var Pest Our connection handler **/
protected $library = null;
/** @var string $oken **/
@YOzaz
YOzaz / Yourls2.php
Last active October 30, 2015 10:56
<?php
/* ... */
const RETURN_FORMAT_JSON = 'json';
const RETURN_FORMAT_XML = 'xml';
/**
* Generates new short URL
*
* @param string $url
* @param string $format