Skip to content

Instantly share code, notes, and snippets.

View sarupbanskota's full-sized avatar
💭
I may be slow to respond.

Sarup Banskota sarupbanskota

💭
I may be slow to respond.
View GitHub Profile
@sarupbanskota
sarupbanskota / node_8_v8_options
Last active April 18, 2024 12:31
node 8 v8 options
$ node --v8-options > node_8_v8_options
SSE3=1 SSSE3=1 SSE4_1=1 SAHF=1 AVX=1 FMA3=1 BMI1=1 BMI2=1 LZCNT=1 POPCNT=1 ATOM=0
Usage:
shell [options] -e string
execute string in V8
shell [options] file1 file2 ... filek
run JavaScript scripts in file1, file2, ..., filek
shell [options]
shell [options] --shell [file1 file2 ... filek]
@sarupbanskota
sarupbanskota / README.md
Last active June 9, 2020 21:28
Ember + ESLint + Prettier + Ember Suave
  • new ember app & yarn install
  • ember install ember-cli-eslint@4
// ember-cli-build.js
let app = new EmberApp(defaults, {
  eslint: {
    testGenerator: 'qunit',
    group: true,
    rulesDir: 'eslint-rules',
 extensions: ['js'],
@sarupbanskota
sarupbanskota / ember-firebase.markdown
Last active September 23, 2017 15:34
Ember + Firebase

Install and configure dotenv

ember install ember-cli-dotenv touch .env

Add .env to .gitignore

Install and configure firebase

ember install emberfire

babel-cli
babel-code-frame
babel-core
babel-generator
babel-helper-bindify-decorators
babel-helper-builder-binary-assignment-operator-visitor
babel-helper-builder-react-jsx
babel-helper-call-delegate
babel-helper-define-map
babel-helper-explode-assignable-expression
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Your awesome title</title>
<meta name="description" content="Write an awesome description for your new site here. You can edit this line in _config.yml. It will appear in your document head meta (for Google search resu...">
@sarupbanskota
sarupbanskota / handler.js
Last active February 24, 2016 12:16
NAV chart normalizing
@generate_nav_growth_chart = (report=false, dataProvider=APP.portfolios)->
nav_chart = new AmCharts.AmStockChart()
nav_chart.pathToImages = "/amchart_images/"
nav_chart.dataDateFormat = "YYYY-MM-DD"
dataSet = new AmCharts.DataSet()
dataSet.title = "NAV"
dataSet.fieldMappings = [
{
fromField: "nav_today"
#! /usr/local/bin/ruby -w
# Sarup Banskota, 1 December 2014
require 'phototrim/version'
require 'RMagick'
include Magick
class Phototrim
def self.trim(max_size, root_dir)
Dir.foreach(root_dir) do |subdir|
unless subdir == "." or subdir == ".."