Skip to content

Instantly share code, notes, and snippets.

View e-oz's full-sized avatar
🕊️

Evgeniy OZ e-oz

🕊️
View GitHub Profile
@e-oz
e-oz / player.js
Created February 22, 2013 07:35
for webinar
// Host where all mp3 files are located
var musicHost = 'http://player.tupi.ca/webinar/music/';
// List of available files
var files = [
'Chris_de_Burgh_-_The_Snows_Of_New_York.mp3',
'Metallica_-_Nothing_Else_Matters.mp3',
'R.E.M._-_Losing_My_Religion.mp3',
'Scooter_-_How_much_is_the_fish.mp3',
'Skrillex_-_Scary_Monsters_and_Nice_Sprites.mp3'
@e-oz
e-oz / folders_structure_idea.md
Last active December 20, 2015 22:38
Structuring an Angular Project

Author of quoted text: Colin Johnsun
Original: http://www.johnpapa.net/structuring-an-angular-project/#comment-142821

I agree with Joel, I found that dividing by functional area made more sense to my workflow.
I tend to work on a particular function in my application and having all related code in the same folder made it easy and quicker to locate them. In my Angular apps, I don’t have separate controller and views folders. Instead, I would have a folder for login, sales, shipping, etc which would contain my related controllers and views. Although I do group by types for services and directives.
Ward mentions about cross cutting concerns. For me, Angular feels more like an MVVM framework than MVC and in my apps, the controllers are the view-models. In the “Shipping” and “Sales” module example, I would have a shipping controller and a sales controllers for each of the respective modules. If the notion of “customer” is roughly the same in both modules then this notion of customer can be abstracted out i

@e-oz
e-oz / deployment.sh
Created January 31, 2016 00:56
Rust code deployment
cargo build --release
sudo killall my_server $RESULT &> /dev/null || true
nohup target/release/my_server > nohup.out 2>&1 &
exit;
From: <Saved by Blink>
Subject: Deploying a Rust App to Google App Engine
Date: Sun, 2 Apr 2016 14:43:06 -0000
MIME-Version: 1.0
Content-Type: multipart/related;
type="text/html";
boundary="----MultipartBoundary--JS6VqEA1CaoIbspHBB61qNgbfVtHBPM813M6vK79n8----"
------MultipartBoundary--JS6VqEA1CaoIbspHBB61qNgbfVtHBPM813M6vK79n8----
Content-Type: text/html
@e-oz
e-oz / node-and-npm-in-30-seconds.sh
Last active July 11, 2016 07:11 — forked from isaacs/node-and-npm-in-30-seconds.sh
Use one of these techniques to install node and npm without having to sudo. Discussed in more detail at http://joyeur.com/2010/12/10/installing-node-and-npm/ Note: npm >=0.3 is *safer* when using sudo.
echo 'export PATH=$HOME/local/bin:$PATH' >> ~/.bash_profile
. ~/.bash_profile
mkdir ~/local
mkdir ~/node-latest-install
cd ~/node-latest-install
curl http://nodejs.org/dist/node-latest.tar.gz | tar xz --strip-components=1
./configure --prefix=~/local
make install # ok, fine, this step probably takes more than 30 seconds...
curl https://www.npmjs.com/install.sh | sh
# Compiled source #
###################
*.com
*.class
*.dll
*.exe
*.o
*.so
# Packages #
@e-oz
e-oz / nginx.conf
Created January 30, 2016 18:29
nginx proxy for Rust web server
server {
listen 80;
server_name api.server.domain;
keepalive_timeout 65;
location / {
proxy_set_header X-Forwarded-For $remote_addr;
proxy_pass http://localhost:3000;
proxy_temp_path /home/ec2-user/proxy_tmp;
}
}
@e-oz
e-oz / rustup.sh
Created December 25, 2016 11:12
Rust installation old way - sudo curl -sSf https://static.rust-lang.org/rustup.sh | sh -s -- --channel=beta
#!/bin/sh
# Copyright 2015 The Rust Project Developers. See the COPYRIGHT
# file at the top-level directory of this distribution and at
# http://rust-lang.org/COPYRIGHT.
#
# Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
# http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
# <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
# option. This file may not be copied, modified, or distributed
# except according to those terms.
@e-oz
e-oz / adobe.html
Last active January 8, 2017 11:22
<!DOCTYPE html><html lang="en" class="wf-adobeclean-n4-active wf-adobeclean-n7-active wf-adobeclean-i4-active wf-adobeclean-i7-active wf-adobeclean-n3-active wf-sourcecodepro-n7-active wf-sourcecodepro-n4-active wf-active"><head class="at-element-marker" style="visibility:visible;"><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><meta name="keywords" content="a, and, cancel, cancel_order, do, easy"><title>how to cancel monthly subscription to photoshop... |Adobe Community</title><meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="https://forums.adobe.com/8.0.3.6eafe9c/styles/jive-base.css" type="text/css" media="all"><link rel="stylesheet" href="https://forums.adobe.com/8.0.3.6eafe9c/styles/jive.css" type="text/css" media="all"><link rel="stylesheet" href="https://forums.adobe.com/8.0.3.6eafe9c/styles/jive-visor.css" type="text/css" media="all"><link rel="stylesheet" type="text/css" href="https://forums.adobe.com/plugins/machine-translation/r
@e-oz
e-oz / locator.link.js
Last active November 29, 2018 23:20
Protractor locator to find <a> element by href attribute