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 | |
/* | |
* The following code illustrates how to use batch operations with the | |
* new Mailchimp v3 API. Much of what I found on the net was half baked | |
* and relied on another layer of abstraction. | |
* | |
*/ | |
$subscribers = []; | |
$batch_operations = []; |
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
/* | |
* Simple message relay server you could use for almost anything | |
* A popular specific use case is for chat/multiplayer games | |
*/ | |
import java.io.BufferedReader; | |
import java.io.IOException; | |
import java.io.InputStreamReader; | |
import java.io.PrintWriter; | |
import java.net.*; |
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
/* | |
* Very simple demo showing how to play videos | |
* using RawTexture and Unity 5.x UI | |
* | |
* Just a note - this is PC/OSX specific | |
*/ | |
using UnityEngine; | |
using UnityEngine.UI; | |
using System.Collections; |
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
/* | |
* A simplistic chat relay server that pools client connections | |
* Written with Node, ES5 & using web sockets (Socket.io) | |
*/ | |
var io = require("socket.io"); | |
var socket = io.listen(8001); | |
var people = []; | |
// On connection start |
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
RewriteEngine On | |
RewriteCond %{HTTPS} off | |
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301] |
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
import { Component, SimpleChanges, ViewChildren } from '@angular/core'; | |
import { BaseChartDirective } from 'ng2-charts/ng2-charts'; | |
@Component({ | |
selector: 'app', | |
template: '<canvas baseChart #chart | |
[chartType]="'line'" | |
[options]="chartOptions" | |
[labels]="chartLabels" | |
[colors]="chartColors" |
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 init() { | |
// Matter.js module aliases | |
let Engine = Matter.Engine, | |
World = Matter.World, | |
Composites = Matter.Composites, | |
Bodies = Matter.Bodies; | |
// Particle options | |
let particleOptions = { | |
friction: 0.05, |
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
"use strict" ; | |
function init() { | |
let socket = io('http://localhost:3000'); | |
let div = document.createElement("div"); | |
let top = 10 ; | |
let left = 10 ; | |
let movementIncrement = 5 ; | |
let randomNumber = Math.random() + "" ; |
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 init() { | |
"use strict" ; | |
var canvas = document.getElementsByTagName("canvas")[0] ; | |
var context = canvas.getContext("2d") ; | |
var particles = [] ; | |
var width = 1024 ; | |
var height = 680 ; |
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
<h1>Design Patterns</h1> | |
<h2>Singleton classes ( persist one object over multiple calls )</h2> | |
<?php | |
class Database | |
{ |
OlderNewer