Skip to content

Instantly share code, notes, and snippets.

Sam Guergenenov samguergen

Block or report user

Report or block samguergen

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@samguergen
samguergen / app.js
Created Feb 13, 2019
Wordpress blog thumbnail generator functionality files isolated from the widget repo
View app.js
var express = require('express');
var nodemailer = require('nodemailer');
var smtpTransport = require('nodemailer-smtp-transport');
var app = express();
const MongoClient = require('mongodb').MongoClient;
var mongo = require('mongodb');
var session = require('express-session');
var cookieParser = require('cookie-parser');
var bodyParser = require('body-parser');
@samguergen
samguergen / app.js
Created Feb 13, 2019
Comments functionality files isolated from the widget repo
View app.js
var express = require('express');
var nodemailer = require('nodemailer');
var smtpTransport = require('nodemailer-smtp-transport');
var app = express();
const MongoClient = require('mongodb').MongoClient;
var mongo = require('mongodb');
var session = require('express-session');
var cookieParser = require('cookie-parser');
var bodyParser = require('body-parser');
@samguergen
samguergen / CalendarService.js
Created Feb 13, 2019
Timesheets functionality files isolated from the widget repo
View CalendarService.js
var myApp = angular.module('myApp');
myApp.service('CalendarService', ['$http','$q', function($http, $q){
this.adjustTimeForCalendar = function(theTime) {
var time = theTime.replace(" ", "");
time = time.toUpperCase();
var adjustedTime = {
hour: 0,
min: 0
@samguergen
samguergen / app.js
Created Feb 13, 2019
File Upload functionality files isolated from the widget repo
View app.js
var express = require('express');
var nodemailer = require('nodemailer');
var smtpTransport = require('nodemailer-smtp-transport');
var app = express();
const MongoClient = require('mongodb').MongoClient;
var mongo = require('mongodb');
var session = require('express-session');
var cookieParser = require('cookie-parser');
var bodyParser = require('body-parser');
@samguergen
samguergen / CalendarController.js
Last active Feb 13, 2019
Weekly shift scheduler functionality files isolated from the widget repo
View CalendarController.js
var myApp = angular.module('myApp');
myApp.controller('CalendarCtrl', ['$scope', '$transitions', '$http', '$anchorScroll', '$location', '$stateParams', '$timeout', '$state', '$rootScope', '$window', 'FormService', '$sce', 'DataService', 'ParseVariablesService', '$q', 'CalendarService', function($scope, $transitions, $http, $anchorScroll, $location, $stateParams, $timeout, $state, $rootScope, $window, FormService, $sce, DataService, ParseVariablesService, $q, CalendarService) {
console.log('inside calendar controller');
$scope.eventObj = {}
$scope.adjustTimeForCalendar = function(theTime) {
var time = theTime.replace(" ", "");
time = time.toUpperCase();
var adjustedTime = {
hour: 0,
View wordpressBlogThumbnailCarousel.html
<!DOCTYPE html>
<div class="jumbotron" ng-init="fetchRecentBlogURLs()">
<div class="container section-content">
<h1 style="text-align:center;font-size:50px">
<a href="http://blog.itnamerica.org/">ITN<em>America</em> Blog</a>
</h1>
<div class="row">
<div class="col-md-4 mt-25" ng-repeat="entry in blogEntries">
<div class="blog-thumbnail">
<a ng-href="{{entry.blogURL}}">
@samguergen
samguergen / manual array flatten function
Last active Sep 16, 2016
manual array flatten function
View manual array flatten function
function flattenIt(arr){
var str = arr.toString();
str.replace('[','').replace(']','');
var flatArr = str.split(',');
var numArr = flatArr.map(Number);
return numArr;
}
flattenIt([[1,2,[3]],4]);
View deaf_grandma
puts "Hello my little pumpkin, tell grandma everything..."
count = 0
while true
reply = gets.chomp
if reply == "BYE"
count += 1
if count == 3
puts "Goodbye!"
You can’t perform that action at this time.