Skip to content

Instantly share code, notes, and snippets.

View whdupreez's full-sized avatar

Willy du Preez whdupreez

View GitHub Profile
@whdupreez
whdupreez / angular-service.ts
Created October 6, 2015 06:03
Angular service in TypeScript
module storage {
export class Storage {
public static $inject = [
'$window'
]
constructor(private $window: angular.IWindowService) {
}
@whdupreez
whdupreez / angular-directive.ts
Last active October 6, 2015 06:02
Angular directive in TypeScript
module ui {
export class ButtonDirective implements angular.IDirective {
public template: string;
constructor() {
this.template = '<input class="btn" type="submit" value="Submit">';
}
@whdupreez
whdupreez / gist:9301fcb2d3de760a90b4
Last active August 29, 2015 14:07
Common MySQL Commands
-- Show databases and tables
show databases;
show tables;
-- Show all users
SELECT user FROM mysql.user;
-- Create database and user (% login from anywhere)
CREATE DATABASE 'newdb'
CREATE USER 'newuser'@'localhost' IDENTIFIED BY 'password';
@whdupreez
whdupreez / gist:7d8a53903712894aefb4
Created June 1, 2014 22:53
Gradle: Import buildSrc project in Eclipse
settings.gradle
---------------
rootProject.name = "myproject"
include "buildSrc"
rootProject.children.find{ it.name == "buildSrc" }.name = "myproject-build-src"
buildSrc/build.gradle