Skip to content

Instantly share code, notes, and snippets.

@azmenak
azmenak / gulpfile.js
Last active April 24, 2017 21:35
Example Gulpfile for Jekyll
var options, paths,
gulp = require("gulp"),
merge = require("merge-stream"),
path = require("path"),
clean = require("gulp-clean"),
concat = require("gulp-concat"),
markdown = require("gulp-markdown"),
minifyCSS = require("gulp-minify-css"),
removeLines = require("gulp-remove-lines"),
@azmenak
azmenak / case1.md
Created June 11, 2014 15:56
Upper Limit on Range Forward
  1. Upper Limit on Range Forward

(20%) Employing the spot rate version of the Black-Scholes foreign exchange valuation model, determine the appropriate value of the upper limit of the range forward on the NZD recommended by Banco Manquehue. This requires a trial and error procedure. Confine your answer to three significant digits.

Recall that to apply the Black-Scholes model in a situation where bid-ask and deposit/borrowing rate spreads exist, the midpoints of said spreads must be used. As well, note that a range forward has a value of zero at inception and that a range forward may be viewed as an option collar.

Value for buy forward range

When

@azmenak
azmenak / VPN-on-Mac-OS.md
Last active August 29, 2015 14:03
Setup VPN on Mac OS

VPN Setup

Open up the network config in system preferences

net config


  1. Hit the plus button in the bottom right

Business Models

Advertising

Models Examples
Display ads Yahoo!
Search ads Google
<link rel="import" href="../components/polymer/polymer.html">
<polymer-element name="my-element">
<template>
<style>
:host {
position: absolute;
width: 100%;
height: 100%;
@azmenak
azmenak / rps.py
Created February 20, 2015 18:03
RPS Sample
import random
player = raw_input('RPS!: ')
RPS = ("rock", "paper", "scissors")
computer = RPS[random.randint(0,2)]
R = RPS[0]
P = RPS[1]
S = RPS[2]
'use strict';
var React = require('react');
var ReactScriptLoaderMixin = require('react-script-loader').ReactScriptLoaderMixin;
var ReactStripeCheckout = React.createClass({
mixins: [ReactScriptLoaderMixin],
getDefaultProps: function() {
@azmenak
azmenak / bash
Created February 11, 2016 09:37
PPTP + Shadowsocks
#!/bin/sh
# Setup Simple PPTP VPN server and Shadowsocks server
printhelp() {
echo "
Usage: sh setup.sh [OPTION]
If you are using custom password , Make sure its more than 8 characters. Otherwise it will generate random password for you.
If you trying set password only. It will generate Default user with Random password.
example: sudo bash setup.sh -u vpn -p mypass

Sourcegraph Notes

General

  • maybe the option to automatically sync remote repos would be nice(or some VScode style alert that N amount of remote changes have not been synced)
    • every so often I collapse all the files in explorer and go down the list and click on "sync" to get the latest files
  • Strange thing in search pallet, if I type in the name (or partial name) of a repo first, I cannot search within it eg.
    • I want to open the Field file in the formik repo
    • Field is super generic so I type formikfield in the search, but get no results

Adding New Repos

The basic idea was the remove floats from the layout and switch to flexbox.

  1. There is a selector .page:not(.home) #content which holds the content for site; changed the style to
padding-bottom: 100px;
padding-right: 30px;
padding-left: 200px;
display: flex;
justify-content: center;