Skip to content

Instantly share code, notes, and snippets.

View jagdeepsingh's full-sized avatar

Jagdeep Singh jagdeepsingh

  • Mohali
View GitHub Profile
@jagdeepsingh
jagdeepsingh / README.md
Last active September 15, 2017 11:23
Stripe
@jagdeepsingh
jagdeepsingh / README.md
Last active May 23, 2017 08:02
Slim- Slim Framework source code

Slim

HTML elements

p Hello world
p = user.name

Binary

A binary is a bitstring where number of bits is divisible by 8.

> binary = <<0, 1, 2>>
> byte_size binary
3

> String.valid? binary
@jagdeepsingh
jagdeepsingh / README.md
Last active September 21, 2023 11:57
Set up macOS High Sierra 10.13.6

Set up macOS High Sierra 10.13.6

Open the terminal and type git. If it not installed, you will see a dialog box with a button to install it. Click on the button and git will be installed in a couple of minutes.

$ git --version
git version 2.15.2 (Apple Git-101.1)
@jagdeepsingh
jagdeepsingh / README.md
Last active June 29, 2017 06:33
NihaoPay Payment Gateway
@jagdeepsingh
jagdeepsingh / README.md
Last active June 7, 2018 06:54
rubocop
@jagdeepsingh
jagdeepsingh / cavity_finder.rb
Last active June 1, 2016 18:02
Ruby practices
#!/bin/ruby
class CavityFinder
def initialize(grid)
@grid = grid
end
def cavities
cavities = []
i = 1
@jagdeepsingh
jagdeepsingh / outlook_calendar_service.rb
Last active June 24, 2016 13:45
Ruby service for Microsoft Outlook calendar API
class OutlookCalendarService
APP_ID = your_app_id
APP_SECRET = your_app_secret
LOGIN_API_DOMAIN = 'https://login.microsoftonline.com'
AUTHORIZE_PATH = '/common/oauth2/v2.0/authorize'
TOKEN_PATH = '/common/oauth2/v2.0/token'
CALENDAR_API_DOMAIN = 'https://outlook.office365.com'
VERSION_PATH = '/api/v2.0'