Skip to content

Instantly share code, notes, and snippets.

View doomsbuster's full-sized avatar

Mr. Doomsbuster doomsbuster

View GitHub Profile
@doomsbuster
doomsbuster / .spacemacs
Created December 30, 2018 23:09
My personal spacemacs configuration
;; -*- mode: emacs-lisp -*-
;; This file is loaded by Spacemacs at startup.
;; It must be stored in your home directory.
(defun dotspacemacs/layers ()
"Configuration Layers declaration.
You should not put any user code in this function besides modifying the variable
values."
(setq-default
;; Base distribution to use. This is a layer contained in the directory
let request = require('supertest');
let chai = require('chai');
const ENDPOINT = 'http://localhost:10000';
describe('Grafeas API Spec Test', function(){
it ('should return a list of all projects', (done) => {
return request(ENDPOINT)
.get('/v1alpha1/projects')
@doomsbuster
doomsbuster / Dockerfile
Created December 30, 2016 20:35
Apache Container
FROM ubuntu:14.04
MAINTAINER Mr. Doomsbuster <administrator@ashishdesai.com>
RUN apt-get -y update && apt-get -y install \
apache2 \
&& rm -rf /var/lib/apt/lists/*
COPY entrypoint.sh /entrypoint.sh
RUN chmod 755 /entrypoint.sh
ENTRYPOINT ["/entrypoint.sh"]
var webdriver = require('webdriverio');
var options = {
desiredCapabilities: {
browserName: 'chrome'
},
port: 10000,
logLevel: 'verbose',
coloredLogs: true,
debug: true
};
node test.js
=======================================================================================
Selenium 2.0 / webdriver protocol bindings implementation with helper commands in nodejs.
For a complete list of commands, visit http://webdriver.io/api.html.
=======================================================================================
[22:08:37] COMMAND POST "/wd/hub/session"
[22:08:37] DATA {"desiredCapabilities":{"javascriptEnabled":true,"locationContextEnabled":true,"handlesAlerts":true,"rotatable":true,"browserName":"chrome","loggingPrefs":{"browser":"ALL","driver":"ALL"},"requestOrigins":{"url":"http://webdriver.io","version":"4.2.3","name":"webdriverio"}}}
@doomsbuster
doomsbuster / SampleOutput
Created January 1, 2014 14:37
Snap Gradients with Percentage offset values
var g = s.gradient("r(145,331,38)#fff:0%-rgb(75,75,123):50%-rgb(68,68,68):100%");
console.log(g.toString());
Output:
<radialGradient cx="145" cy="331" r="38">
<stop offset="NaN%" stop-color="#ffffff"/>
<stop offset="NaN%" stop-color="#4b4b7b"/>
<stop offset="NaN%" stop-color="#444444"/>
</radialGradient>
var g2 = s.gradient("r(145,331,38)#fff:0-rgb(75,75,123):50-rgb(68,68,68):100");
@doomsbuster
doomsbuster / grunt build logs
Created November 24, 2013 17:09
index.html for the usemin target
Processing as HTML - dist/index.html
Update the HTML to reference our concat/min/revved script files
<script src="scripts/modules.js" changed to <script src="scripts/401338d2.modules.js"
<script src="scripts/scripts.js" changed to <script src="scripts/23fa2277.scripts.js"
Update the HTML with the new css filenames
<link rel="stylesheet" href="styles/main.css" changed to <link rel="stylesheet" href="styles/f7f78e67.main.css"
Update the HTML with the new img filenames
Update the HTML with data-main tags
Update the HTML with data-* tags
Update the HTML with background imgs, case there is some inline style
@doomsbuster
doomsbuster / MinifiedScript.js
Last active December 28, 2015 13:29
usemin task issue
"use strict";angular.module("ashishdesaicomApp",["ngRoute"]).config(["$routeProvider",function(a){a.when("/",{templateUrl:"views/home.html",controller:"MainCtrl"}).when("/tech",{templateUrl:"views/technology.html",controller:"MainCtrl"}).when("/training",{templateUrl:"views/training.html",controller:"MainCtrl"}).otherwise({redirectTo:"/"})}]).run(["$rootScope","$location","$window",function(a,b,c){a.$watch(function(){return b.path()},function(a,b){""!=a&&""!=b&&(console.log(a+"::"+b),a!=b&&"/"==a&&(c.location.href="/"))},!0)}]);var SNOW_SCENE=function(){function a(){cancelAnimationFrame(e)}function b(){e=requestAnimationFrame(b),c()}function c(){for(var a=0;a<r.length;a++){var b=r[a];b.updatePhysics(),b.position.y<-1e3&&(b.position.y+=2e3),b.position.x>1e3?b.position.x-=2e3:b.position.x<-1e3&&(b.position.x+=2e3),b.position.z>1e3?b.position.z-=2e3:b.position.z<-1e3&&(b.position.z+=2e3)}i.position.x+=.05*(p-i.position.x),i.position.y+=.05*(-q-i.position.y),i.lookAt(j.position),k.render(j,i)}function d(a,b){retu
@doomsbuster
doomsbuster / CSS File
Last active December 28, 2015 08:59
Concat Issue CSS File 1 is imported before CSS File 2
/*@import url(http://fonts.googleapis.com/css?family=Chela+One);
@import url(http://fonts.googleapis.com/css?family=Architects+Daughter);
@import url(http://fonts.googleapis.com/css?family=Marck+Script);*/
/* Samsung Galaxy S4 Landscape */
/*@media screen (-webkit-min-device-pixel-ratio: 1.5),(min-resolution: 144dpi) and (device-width: 1920px) and (orientation: landscape){
}
*/
/* Samsung Galaxy S4 Portrait */
.maincontainer {
@doomsbuster
doomsbuster / package.json
Created November 10, 2013 23:09
Grunt-contirb-imagemin not compressing
// Generated on 2013-11-10 using generator-angular 0.4.0
'use strict';
var LIVERELOAD_PORT = 35729;
var lrSnippet = require('connect-livereload')({ port: LIVERELOAD_PORT });
var mountFolder = function (connect, dir) {
return connect.static(require('path').resolve(dir));
};
// # Globbing
// for performance reasons we're only matching one level down: