Skip to content

Instantly share code, notes, and snippets.

View IcodeNet's full-sized avatar
😀

Byron Thanopoulos IcodeNet

😀
View GitHub Profile
@IcodeNet
IcodeNet / How.md
Last active May 20, 2017 12:28
Installing Node Without Permissions on Windows

go to https://nodejs.org/dist/ and pick up the version you want

lets say you need node-v7.10.0 for windows

  • open the right folder such as : https://nodejs.org/dist/latest-v7.x/
  • click on node-v7.10.0-win-x64.zip to download it locally to a location on your PC
  • extract the contents under for ex. C:\nodejs\v7.10.0
  • now add the path of the extracted directory to the $path so that you use the program : open a cmd and run > set PATH=%PATH%;C:\nodejs\v7.10.0;

Instal NAVE for virtual node switching

  • run from cmd > npm i -g nave
@IcodeNet
IcodeNet / minimum Angular 2 package.json
Last active May 19, 2017 05:58
minimum Angular 2 package.json
{
"name": "angular2-minimum-viable-application",
"scripts": {
"start": "tsc && concurrently 'npm run tsc:w' 'npm run lite'",
"lite": "lite-server",
"postinstall": "npm install -s @types/node @types/core-js",
"tsc": "tsc",
"tsc:w": "tsc -w"
},
"dependencies": {
@IcodeNet
IcodeNet / settings.json
Created May 2, 2017 15:15 — forked from JohannesHoppe/settings.json
VSCode: proxy settings
// VSCode: Place your settings in this file to overwrite the default settings
{
"http.proxy": "http://user:pass@proxy.com:8080",
"https.proxy": "http://user:pass@proxy.com:8080",
"http.proxyStrictSSL": false
}
@IcodeNet
IcodeNet / package.json
Created October 27, 2016 13:07 — forked from SteveAquino/package.json
Install protractor with a specific version of chrome driver.
{
"name": "protractor-webdriver-2-16-test",
"devDependencies": {
"protractor": "latest",
},
"scripts": {
"webdriver:version": "sed -i.bak 's/\"chromedriver\": \"[0-9\\.]*\"/\"chromedriver\": \"2.16\"/' node_modules/protractor/config.json",
"webdriver:update": "./node_modules/protractor/bin/webdriver-manager update",
"postinstall": "npm run webdriver:version && npm run webdriver:update"
}
@IcodeNet
IcodeNet / selenium_node_install.bat
Created October 25, 2016 20:19 — forked from koola/selenium_node_install.bat
Install Selenium grid node as a windows service
@echo off
powershell.exe -executionpolicy unrestricted -command "%~dp0\selenium_node_install.ps1 -nodes ie -hub 192.168.1.1"
REM powershell.exe -executionpolicy unrestricted -command "%~dp0\selenium_node_install.ps1 -nodes ie,chrome -hub 192.168.1.1"
REM powershell.exe -executionpolicy unrestricted -command "%~dp0\selenium_node_install.ps1 -nodes ie,chrome,firefox -hub 192.168.1.1"
pause
"scripts": {
"dev-server": "webpack-dev-server — config webpack-dev-server.config.js — progress — colors — port 2992 — inline",
"hot-dev-server": "webpack-dev-server — config webpack-hot-dev-server.config.js — hot — progress — colors — port 2992 — inline",
"build": "webpack — config webpack-production.config.js — progress — profile — colors",
"start-dev": "node lib/server-development",
"start": "node lib/server-production"
}
import {isJSON} from '../utils/is-json';
import request from './superagent';
export async function({method = 'GET', url}) {
method = method.toUpperCase();
const methods = ['GET', 'POST'];
let [foundMethod] = methods.filter(m => method === m);
if (!foundMethod) {
throw new Error('you specified an unknown method')
import 'script!history.js/scripts/bundled/html4+html5/jquery.history';
import 'script!jquery.cookie';
/**
* These function calls bootstrap all of the global files, essentially requiring them in
* to mimic concat behavior. This is a temporary solution until we begin `require`ing utilities
* into page level JS rather than referencing them as globals.
* RegEx excludes files that have already been required in a specific order or those that should be omitted.
*
*/
@IcodeNet
IcodeNet / webpack.config.js
Created May 8, 2016 14:33 — forked from learncodeacademy/webpack.config.js
Sample Basic Webpack Config
var debug = process.env.NODE_ENV !== "production";
var webpack = require('webpack');
module.exports = {
context: __dirname,
devtool: debug ? "inline-sourcemap" : null,
entry: "./js/scripts.js",
output: {
path: __dirname + "/js",
filename: "scripts.min.js"
@IcodeNet
IcodeNet / Angular Overlay Directive
Created March 4, 2016 12:17 — forked from domderen/Angular Overlay Directive
Angular directive for creating dynamic overlays over any element. Directive is automatically preparing parent to have an overlay, and dynamically sets the height of the overlay if the height of the parent will change. Second directive allows to set any element in the vertical and horizontal center of the parent element. It dynamically reposition…
var overlayModule = angular.module('angular-overlay', []).directive('elementOverlay', [function () {
return {
restrict: 'A',
link: function (scope, elem, attrs) {
$(elem[0].parentNode).css('position', 'relative');
scope.$watch(function () {
return $(elem[0].parentNode).height();
}, function (v) {
elem.css('height', v + 'px');