Skip to content

Instantly share code, notes, and snippets.

View chyngyz's full-sized avatar

Chyngyz Arystan chyngyz

View GitHub Profile
@chyngyz
chyngyz / gist:21eca59186e650900f3f
Created December 24, 2015 04:17 — forked from alexcrown/gist:089971889fda0ca4e7b1
Jasig CAS auth in angular webapp
$scope.login = function () {
$http({ // getting TGT (Ticket Granting Ticket)
method: 'POST',
url: 'http://localhost/cas/v1/tickets',
headers: {'Content-Type': 'application/x-www-form-urlencoded'},
data: $.param({username: $scope.loginform.username, password: $scope.loginform.password})
}).success(function(data, status, headers) {
// CAS returns location where we can request service ticket
var location = headers('Location');
$http({ //requesting service ticket, rest/app/heartbeat is part of our app
@chyngyz
chyngyz / angularjs-modals.htm
Created November 30, 2015 04:50 — forked from bennadel/angularjs-modals.htm
Creating A Simple Modal System In AngularJS
<!doctype html>
<html ng-app="Demo">
<head>
<meta charset="utf-8" />
<title>
Creating A Simple Modal System In AngularJS
</title>
<link rel="stylesheet" type="text/css" href="./demo.css"></link>
@chyngyz
chyngyz / entypo.css
Last active August 29, 2015 14:11 — forked from pnull/entypo.css
@font-face {
font-family: 'EntypoRegular';
src: url('font/entypo.eot');
src: url('font/entypo.eot?#iefix') format('embedded-opentype'),
url('font/entypo.woff') format('woff'),
url('font/entypo.ttf') format('truetype'),
url('font/entypo.svg#EntypoRegular') format('svg');
font-weight: normal;
font-style: normal;
}