Skip to content

Instantly share code, notes, and snippets.

View tcdevs's full-sized avatar

TC Devs tcdevs

  • Technische Centrale
View GitHub Profile
@tcdevs
tcdevs / html_angular.xml
Created July 19, 2013 13:22
html5+bootstrap+awesome+angular
<snippet>
<content><![CDATA[
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8"/>
<title>${1:title}</title>
<link href='http://fonts.googleapis.com/css?family=Noto+Sans:400,700,400italic,700italic' rel='stylesheet' type='text/css'>
<link href="http://netdna.bootstrapcdn.com/twitter-bootstrap/2.3.2/css/bootstrap-combined.no-icons.min.css" rel="stylesheet">
<link href="http://netdna.bootstrapcdn.com/font-awesome/3.2.1/css/font-awesome.min.css" rel="stylesheet">
@tcdevs
tcdevs / all-extensions.md
Created July 26, 2013 06:26
allExtensions.md

#SublimeText2 Extensions July 2013

  • Prefixr
  • SCSS Snippets
  • AdvancedNewFile
  • AngularJS Attributes Completion
  • ASCII Decorator
  • Nettuts+ Fetch
  • Minifier
  • Color Scheme - Default
//Enabling Javascript
Include javascript inside HTML:
<script>
x = 3;
</script>
//Reference external file:
<script src="http://example.com/script.js"></script>
//Redirect if javascript disabled:
@tcdevs
tcdevs / customDirectives.js
Created August 13, 2013 14:17
Angular JS - Using Directives to Create Custom Attributes - http://www.codeproject.com/script/Articles/ViewDownloads.aspx?aid=464939
var dsApp = angular.module('dsApp', []);
2
3
4 dsApp.directive('ngDsFade', function () {
5 return function (scope, element, attrs) {
6 element.css('display', 'none');
7 scope.$watch(attrs.ngDsFade, function (value) {
8 if (value) {
9 element.fadeIn(200);
10 } else {
@tcdevs
tcdevs / index.html
Created August 14, 2013 12:09
angular1.2rc1 and Bootstrap3rc2
<!doctype html>
<html lang="en" ng-app>
<head>
<meta charset="UTF-8"/>
<title>title</title>
<link href='http://fonts.googleapis.com/css?family=Noto+Sans:400,700,400italic,700italic' rel='stylesheet' type='text/css'>
<link href="http://netdna.bootstrapcdn.com/bootstrap/3.0.0-wip/css/bootstrap.min.css" rel="stylesheet">
<link href="http://netdna.bootstrapcdn.com/font-awesome/3.2.1/css/font-awesome.min.css" rel="stylesheet">
<style>body{font-family: 'Noto Sans';}</style>
</head>
var app = angular.module('app');
app.directive('mkShortcut', function($document) {
// Ref: http://goo.gl/7XDys
function fireEvent(element, event) {
if (document.createEvent) {
// dispatch for firefox + others
var evt = document.createEvent("HTMLEvents");
evt.initEvent(event, true, true ); // event type,bubbling,cancelable
var app = angular.module('app', []);
app.directive('yaTree', function () {
return {
restrict: 'A',
transclude: 'element',
priority: 1000,
terminal: true,
compile: function (tElement, tAttrs, transclude) {