Skip to content

Instantly share code, notes, and snippets.

View sonukapoor's full-sized avatar
🎯
Hello :)

Sonu Kapoor sonukapoor

🎯
Hello :)
View GitHub Profile
Public Class RenderUnit
' 1 inch = 72 points
Public WidthPoints As Integer
Public HeightPoints As Integer
Public Items As IEnumerable
Public FileName As String
End Class
Public Interface IPDFGenerator
Function CreatePDF(ByVal items As Dictionary(Of String, Object)(), ByVal language As String) As String
Dim pdf As Pdf = New Pdf()
Dim license As License = New License
license.SetLicense(Server.MapPath("~/Licenses/Aspose.Custom.lic"))
Dim section As Section = pdf.Sections.Add()
'section.PageInfo.PageWidth = 360 ' 1 inch = 72 points = 5 * 72 = 360
'section.PageInfo.PageHeight = 504
Public Class RenderUnit
' 1 inch = 72 points
Public WidthPoints As Integer
Public HeightPoints As Integer
Public Items As IEnumerable
Public FileName As String
End Class
Public Interface IPDFLayout
Public Class RenderUnit
' 1 inch = 72 points
Public WidthPoints As Integer
Public HeightPoints As Integer
Public Items As IEnumerable
Public FileName As String
End Class
# Place the below into the following file: ~/.config/fish/config.fish
# migrating from https://github.com/robbyrussell/oh-my-zsh/blob/master/plugins/git/git.plugin.zsh
# Aliases
alias g='git'
#compdef g=git
alias gst='git status'
#compdef _git gst=git-status
alias gd='git diff'
#compdef _git gd=git-diff
@sonukapoor
sonukapoor / couchdb-ec2-install.sh
Created June 12, 2017 20:15 — forked from cesine/couchdb-ec2-install.sh
Set up CouchDB on EC2
#!/bin/bash
#
# For http://stackoverflow.com/questions/6162891/installing-couchdb-in-aws-ec2-free-tier
#
# This script installs and configures couchdb on a fresh Amazon Linux AMI instance.
# It is a modified fork of the original rake script, but does not use rake (just good ol' linux tools)
# Based on: http://wiki.apache.org/couchdb/Installing_on_RHEL5
defaults write NSGlobalDomain KeyRepeat -int 0
@sonukapoor
sonukapoor / gist:a35055ab8553a056dca6aaf60e16fbe8
Created June 28, 2017 13:28
Set current directory in prompt of iTerm - Oh My Zsh
For the people asking about to show only the current path, do this:
- Open this directory ~/.oh-my-zsh/themes
- Open the agnoster.zsh-theme file with any text editor
- Go to the prompt_dir() function
- Replace the line in the function with this: prompt_segment blue black '%c'
- Restart iTerm or enter source ~/.zshrc
- Done. Now the theme only shows the current path.
@sonukapoor
sonukapoor / zsh config
Created June 28, 2017 13:50
zsh config located at ~/.zshrc using nvm, agnoster theme, git aliases
# If you come from bash you might have to change your $PATH.
# export PATH=$HOME/bin:/usr/local/bin:$PATH
# Path to your oh-my-zsh installation.
export ZSH=/Users/skapoor/.oh-my-zsh
# Set name of the theme to load. Optionally, if you set this to "random"
# it'll load a random theme each time that oh-my-zsh is loaded.
# See https://github.com/robbyrussell/oh-my-zsh/wiki/Themes
ZSH_THEME="agnoster"
@sonukapoor
sonukapoor / gist:16b95052703ab0dcf7db2ca41a2e6676
Last active June 28, 2017 14:20
zsh integration with vscode
Download and install the fonts from: https://github.com/powerline/fonts
Use the following user settings in VS Code:
// Place your settings in this file to overwrite the default settings
{
"terminal.external.osxExec": "iterm.app",
"terminal.integrated.shell.osx": "/bin/zsh",
"terminal.integrated.fontFamily": "Source Code Pro for Powerline"
}