Skip to content

Instantly share code, notes, and snippets.

View smnuman's full-sized avatar
🏠
Working from home

Numan Syed smnuman

🏠
Working from home
View GitHub Profile
@smnuman
smnuman / osx_install.sh
Created March 17, 2018 13:19 — forked from t-io/osx_install.sh
Install most of my Apps with homebrew & cask
#!/bin/sh
echo Install all AppStore Apps at first!
# no solution to automate AppStore installs
read -p "Press any key to continue... " -n1 -s
echo '\n'
echo Install and Set San Francisco as System Font
ruby -e "$(curl -fsSL https://raw.github.com/wellsriley/YosemiteSanFranciscoFont/master/install)"
echo Install Homebrew, Postgres, wget and cask
ruby -e "$(curl -fsSL https://raw.github.com/Homebrew/homebrew/go/install)"
@smnuman
smnuman / terminalsize.py
Created January 25, 2018 17:26 — forked from jtriley/terminalsize.py
Get current terminal size on Linux, Mac, and Windows
#!/usr/bin/env python
import os
import shlex
import struct
import platform
import subprocess
def get_terminal_size():
""" getTerminalSize()
#!/usr/bin/env python
import os
import shlex
import struct
import platform
import subprocess
__func = None
def get_terminal_size():
@smnuman
smnuman / encrypted-git-repo.md
Created July 3, 2017 03:22
Transparent Git Encryption

Transparent Git Encryption

This document has been modified from its [original format][m1], which was written by Ning Shang (geek@cerias.net). It has been updated and reformatted into a [Markdown][m2] document by [Woody Gilk][m3] and [republished][m4].

Description

When working with a remote git repository which is hosted on a third-party storage server, data confidentiality sometimes becomes

@smnuman
smnuman / README-Template.md
Created March 22, 2017 17:25 — forked from PurpleBooth/README-Template.md
A template to make good README.md

Project Title

One Paragraph of project description goes here

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.

Prerequisites

_SECTION_BEGIN( "Name" );
SetFormulaName("NMN Chart Stamp");
GfxFont = ParamList("Chosen font", "Tahoma,Monaco,Arial,Times New Roman,Trebuchet MS,",3);
GfxSetOverlayMode( 0 );
GfxSelectFont( GfxFont, Status( "pxheight" ) / 8 );
GfxSetTextAlign( 6 ); // center alignment
GfxSetTextColor( ParamColor("Font color",ColorRGB( 200, 200, 200 )) );
GfxSetBkMode( 0 ); // transparent
GfxTextOut( Name(), Status( "pxwidth" ) / 2, Status( "pxheight" ) / 12 );
GfxSelectFont( GfxFont, Status( "pxheight" ) / 28 );
@smnuman
smnuman / README
Created August 25, 2014 18:14 — forked from Burnfaker/README
THIS IS THE MODIFIED SCRIPT IF YOU LIKE THE ORIGINAL GOTO https://github.com/ilikenwf/apt-fast
====================
About:
====================
apt-fast is a shellscript wrapper for apt-get that can drastically improve apt download
times by downloading packages in parallel, with multiple connections per package.
_SECTION_BEGIN("GIP-3");
/// This whole thing is found and copied here for reference and experiment by Numan on 2014-08-13
/// Original from : http://www.stockmaniacs.net/downloads/afl/gap-finder-plus-gip.afl
/// Details : http://www.stockmaniacs.net/blog/scott-andrews-12-reasons-to-trade-gaps-gap-trading-amibroker-afl/
SetChartOptions(0,chartShowArrows|chartShowDates);
SetChartBkColor(colorGrey50);
_N(Title = StrFormat("{{NAME}} - {{INTERVAL}} {{DATE}} Open %g, Hi %g, Lo %g, Close %g (%.1f%%) Vol " +WriteVal( V, 1.0 ) +" {{VALUES}}", O, H, L, C, SelectedValue( ROC( C, 1 )) ));
Cr = IIf(RSI(9) <= LLV(RSI(9),9) , colorRed , IIf(RSI(9) >=HHV(RSI(9),9) , colorGreen ,IIf(C > O , colorWhite , colorBlack)));
SetBarFillColor( Cr );
Plot( C, "Close", Cr, styleNoTitle | ParamStyle("Style") | GetPriceStyle() );
<?xml version="1.0"?>
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
<fontconfig>
<!--
Documented at
http://linux.die.net/man/5/fonts-conf
To check font mapping run the command at terminal
$ fc-match 'helvetica Neue'
@smnuman
smnuman / NMN-AB-StrengthFinding.md
Last active August 29, 2015 14:04
An indicator to find the strength of an issue for Buy-ing and Sell-ing. Just drag-and-drop on a chart to analyse.

NMN-Strength Finding

A simple yet very usefull indicator-help that shows the strength of an issue of a market.

_SECTION_BEGIN("NMN-Strength Finding");
    //============== A/D ==============
    TRH = IIf( Ref( C, -1 ) > H, Ref( C, -1 ), H );
    TRL = IIf( Ref( C, -1 ) < L, Ref( C, -1 ), L );
    ad = IIf( C > Ref( C, -1 ), C - TRL, IIf( C < Ref( C, -1 ), C - TRH, 0 ) );
    WAD = Cum( ad );
    wu = wad > Ref( wad, -1 );