Skip to content

Instantly share code, notes, and snippets.

View sahat's full-sized avatar

Sahat Yalkabov sahat

  • SIMON Markets LLC
  • Remote
View GitHub Profile
var x = 4;
console.log(x);
var a = function() {
//test
};
angular.module('MyApp', ['ngCookies', 'ngResource', 'ngMessages', 'ngRoute', 'mgcrea.ngStrap'])
.config(function() {
});
@sahat
sahat / redirect_after_login1.js
Created June 8, 2014 20:33
using if statements
app.use(function(req, res, next) {
if (req.path !== '/auth' &&
req.path !== '/login' &&
req.path !== '/logout' &&
req.path !== '/signup' &&
req.path !== '/img' &&
req.path !== '/fonts' &&
req.path !== '/favicon') {
req.session.returnTo = req.path;
next();
app.use(function(req, res, next) {
var path = req.path.split('/')[1];
if (/auth|login|logout|signup|img|fonts|favicon/i.test(path)) {
return next();
}
req.session.returnTo = req.path;
next();
});
@sahat
sahat / index.html
Created December 15, 2014 07:04
roniit.com
<!DOCTYPE html>
<!--[if lt IE 7]> <html class="no-js oldie lt-ie8 lt-ie7" lang="en"> <![endif]-->
<!--[if IE 7]> <html class="no-js oldie lt-ie8" lang="en"> <![endif]-->
<!--[if IE 8]> <html class="no-js oldie lt-ie9" lang="en"> <![endif]-->
<!--[if IE 9]> <html class="no-js lt-ie10" lang="en"> <![endif]-->
<!--[if gt IE 9]><!--> <html class="no-js" lang="en"> <!--<![endif]-->
<head>
<title>RONIIT</title>
<meta charset="utf-8" />
<meta name="description" content="American dark electro-pop artist. Includes biography, discography, tour schedule, gallery, and more." />
// -------------------------------------------------------
// -------------------------------------------------------
//
// Copyright © Keith Driessen.
//
// RUNNIN' WITH THE DEVIL SINCE 1985!
// http://madebygrave.com
// -------------------------------------------------------
// -------------------------------------------------------
// -------------------------------------------------------
// -------------------------------------------------------
//
// Copyright © Keith Driessen.
//
// RUNNIN' WITH THE DEVIL SINCE 1985!
// http://madebygrave.com
// -------------------------------------------------------
// -------------------------------------------------------
@sahat
sahat / functions-of-the-beast.js
Created December 17, 2014 18:06
index.html with templates
// -------------------------------------------------------
// -------------------------------------------------------
//
// Copyright © Keith Driessen.
//
// RUNNIN' WITH THE DEVIL SINCE 1985!
// http://madebygrave.com
// -------------------------------------------------------
// -------------------------------------------------------
@sahat
sahat / confirmPassword.js
Created December 27, 2014 05:16
Confirm Password
angular.module('MyApp')
.directive('repeatPassword', function() {
return {
require: 'ngModel',
link: function(scope, elem, attrs, ctrl) {
var otherInput = elem.inheritedData("$formController")[attrs.repeatPassword];
ctrl.$parsers.push(function(value) {
if (value === otherInput.$viewValue) {
ctrl.$setValidity('repeat', true);
@sahat
sahat / hw1.java
Created September 9, 2011 03:54
homework 1 for cs221
// Name: Sahat Yalkabov
// Date: September 15, 2011
// Class: CS22100
// Homework 1: Radiation Data Log
import java.util.ArrayList;
import java.util.Collections; // to get minimum and maximum
import javax.swing.JOptionPane;;
class hw1 {