Skip to content

Instantly share code, notes, and snippets.

View msurguy's full-sized avatar

Maksim Surguy msurguy

View GitHub Profile
@msurguy
msurguy / chase
Created March 7, 2016 17:53 — forked from jwhendy/chase
#include "FastLED.h"
// must use fastLED 3.1: https://github.com/FastLED/FastLED/tree/FastLED3.1
// fast led constants and initialize
#define DATA_PIN 9
#define LED_TYPE WS2812B
#define COLOR_ORDER GRB
#define NUM_LEDS 48
CRGB leds[NUM_LEDS];
@msurguy
msurguy / LED cloud v.2
Created March 7, 2016 17:53 — forked from mock-turtle/LED cloud v.2
Updated cloud code. Patterns should play on button press.
//import the necessary libraries
#include "FastLED.h"
#include "IRremote.h"
//define some variables
#define LEDPIN 6
#define RECV_PIN 3
#define LED_TYPE NEOPIXEL
#define NUM_LEDS 15
#define BRIGHTNESS 200
// Use this if you believe the iframe may have dynamic content and could change size after it has completely loaded //
// Your Domain Name //
var parent_domain = "http://www.example.com/";
setInterval(function() {
var iframe_height = parseInt($('html').height());
// Add Padding to insure nothing is creating a scroll bar //
iframe_height += 30;
@msurguy
msurguy / chunking.blade.php
Last active June 23, 2017 19:02 — forked from JeffreyWay/example.html
Using array_chunk to wrap a number of DOM elements in another DOM element such as a div
@foreach(array_chunk($posts, 3) as $postSet)
<div class="row"> <!-- this div will surround every three posts -->
@foreach($postSet as $post)
<h3>{{ $post['title'] }}</h3>
@endforeach
</div>
@endforeach
@msurguy
msurguy / install.md
Created January 28, 2014 09:10 — forked from zaherg/install.md

Creating Your Laravel & nginx Server

We will install Larave 4.1 with PHP5.5 & Latest nginx on Ubuntu 12.04.3 x64.

updating your system

apt-get update && apt-get upgrade
adduser [username]
usermod -aG sudo [username]
apt-get -y install git
Setting up Sendy with Laravel
(there might be bugs, I striped out some parts of my code because what I have is more complicated then that, so, sorry if it's broken!)
--
I would recommand creating a database for Sendy only.
Add Sendy's database into your database.php (1)
Create the Campaign model (2), and specify that you want to use Sendy's database (Campaigns are the only thing we really need to create, other things like creating lists can be done through Sendy interface, and there is a PHP library to add subscribers)
Now, it's time to install Sendy, usually somewhere like yourapp.com/sendy or yourapp.com/newsletter

Awesome PHP

A list of amazingly awesome PHP libraries, resources and shiny things.

Composer

.modal-backdrop {
background: #000;
background: rgba(0,0,0,0.9);
background: -webkit-radial-gradient(50% 50%, ellipse closest-corner, rgba(0,0,0,0.45) 1%, rgba(0,0,0,0.8) 100%);
background: -moz-radial-gradient(50% 50%, ellipse closest-corner, rgba(0,0,0,0.45) 1%, rgba(0,0,0,0.8) 100%);
background: -ms-radial-gradient(50% 50%, ellipse closest-corner, rgba(0,0,0,0.45) 1%, rgba(0,0,0,0.8) 100%);
background: radial-gradient(50% 50%, ellipse closest-corner, rgba(0,0,0,0.45) 1%, rgba(0,0,0,0.8) 100%);
filter: alpha(opacity = 80);
opacity: 0;
This file has been truncated, but you can view the full file.
'use strict';
var COMPILED = !0, goog = goog || {};
goog.global = this;
goog.DEBUG = !1;
goog.LOCALE = "en";
goog.provide = function (a) {
if (!COMPILED) {
if (goog.isProvided_(a))
throw Error('Namespace "' + a + '" already declared.');
delete goog.implicitNamespaces_[a];