Skip to content

Instantly share code, notes, and snippets.

View ganesanarun's full-sized avatar
🎲

Ganesan Arunachalam ganesanarun

🎲
  • Thoughtworks
  • Bangalore
View GitHub Profile
@ganesanarun
ganesanarun / Makefile
Created December 3, 2019 16:08 — forked from hjst/Makefile
Makefile for use with PlantUML diagrams
PLANTUML_JAR_URL = https://sourceforge.net/projects/plantuml/files/plantuml.jar/download
DIAGRAMS_SRC := $(wildcard diagrams/*.plantuml)
DIAGRAMS_PNG := $(addsuffix .png, $(basename $(DIAGRAMS_SRC)))
DIAGRAMS_SVG := $(addsuffix .svg, $(basename $(DIAGRAMS_SRC)))
# Default target first; build PNGs, probably what we want most of the time
png: plantuml.jar $(DIAGRAMS_PNG)
# SVG are nice-to-have but don't need to build by default
svg: plantuml.jar $(DIAGRAMS_SVG)
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>JS Bin</title>
<!-- Latest compiled and minified CSS -->
<link rel="stylesheet" href="http://maxcdn.bootstrapcdn.com/bootstrap/3.3.4/css/bootstrap.min.css">
<!-- jQuery library -->
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>
<!-- Latest compiled JavaScript -->
# config/initializers/compression.rb
Rails.application.configure do
# Use environment names or environment variables:
# break unless Rails.env.production?
break unless ENV['ENABLE_COMPRESSION'] == '1'
# Strip all comments from JavaScript files, even copyright notices.
# By doing so, you are legally required to acknowledge
# the use of the software somewhere in your Web site or app:
<!DOCTYPE html>
<html ng-app="myApp">
<head>
<meta charset="utf-8">
<link rel="stylesheet" href="http://cdn.jsdelivr.net/foundation/4.3.2/css/foundation.min.css">
<script src="https:ajax.googleapis.com/ajax/libs/angularjs/1.2.5/angular.js"></script>
<title>Ng Change</title>
<style>
input.ng-invalid {
border: 1px solid red;
<!DOCTYPE html>
<html ng-app="myApp">
<head>
<meta charset="utf-8">
<script src="https:ajax.googleapis.com/ajax/libs/angularjs/1.2.5/angular.js"></script>
<title>Ng Change</title>
</head>
<body>
<div ng-controller="EquationController">
<input ng-model="equation.x" ng-change="Change()" type='text'></input>
@ganesanarun
ganesanarun / index.html
Created December 27, 2014 11:59
Ng Bind Template // source http://jsbin.com/lifuju
<!DOCTYPE html>
<html ng-app>
<head>
<meta charset="utf-8">
<script src="https:ajax.googleapis.com/ajax/libs/angularjs/1.2.5/angular.js"></script>
<title>Ng Bind Template</title>
</head>
<body>
<div ng-init="greeting = 'Hello World'; person.name = 'ganesan'; person.city ='delhi'">
<h1 ng-bind-template = '{{ greeting }} {{ person.name }}, you are living in {{ person.city}}'></h1>
<!DOCTYPE html>
<html ng-app>
<head>
<meta charset="utf-8">
<script src="https:ajax.googleapis.com/ajax/libs/angularjs/1.2.5/angular.js"></script>
<title>Ng Cloak</title>
</head>
<body>
<div ng-init="greeting = 'Hello World'; person.name = 'ganesan'; person.city ='delhi'">
<h2 ng-cloak>{{ person }}</h2>
<!DOCTYPE html>
<html ng-app>
<head>
<meta charset="utf-8">
<script src="https:ajax.googleapis.com/ajax/libs/angularjs/1.2.5/angular.js"></script>
<title>Ng Bind</title>
</head>
<body>
<div ng-init="greeting = 'Hello World'; person.name = 'ganesan'; person.city ='delhi'">
<h1 ng-bind='greeting + " "+ person.name + " you are living in" + " "+ person.city '></h1>
<!DOCTYPE html>
<html ng-app>
<head>
<meta charset="utf-8">
<script src="https:ajax.googleapis.com/ajax/libs/angularjs/1.2.5/angular.js"></script>
<title>Ng Init</title>
</head>
<body>
<div ng-init="greeting = 'Hello World'; person.name = 'ganesan'; person.city ='delhi'">
<h1> {{ greeting }} {{ person.name }} , you are living in {{ person.city }}</h1>
<!DOCTYPE html>
<html ng-app="myApp">
<head>
<meta charset="utf-8">
<script src="https:ajax.googleapis.com/ajax/libs/angularjs/1.2.5/angular.js"></script>
<title>Ng Repeat</title>
<style>
.even
{
color: green;