Skip to content

Instantly share code, notes, and snippets.

@iambibhas
iambibhas / scopes.txt
Last active December 4, 2024 01:49
Sublime Text 2: Snippet scopes
Here is a list of scopes to use in Sublime Text 2 snippets -
ActionScript: source.actionscript.2
AppleScript: source.applescript
ASP: source.asp
Batch FIle: source.dosbatch
C#: source.cs
C++: source.c++
Clojure: source.clojure
CoffeeScript: source.coffee
@omercs
omercs / Oauth2AzureActiveDirectoryRuby
Last active March 2, 2021 12:21
Oauth2 token from Azure Active Directory in Ruby on Rails project
require 'oauth2'
class WelcomeController < ApplicationController
# You need to configure a tenant at Azure Active Directory(AAD) to register web app and web service app
# You will need two entries for these app at the AAD portal
# You will put clientid and clientsecret for your web app here
# ResourceId is the webservice that you registered
# RedirectUri is registered for your web app
CLIENT_ID = 'b6a42...'
CLIENT_SECRET = 'TSbx..'
@endquote
endquote / migrate.js
Last active March 2, 2017 15:29
Migrate private repositories from your GitHub organization to your Bitbucket team.
/*
To use:
* save this script as migrate.js
* fill in the user/pass variables at the top
* save the block of json below as package.json right next to it
* install node.js from nodejs.org
* run 'npm install' from the directory where you saved the files
* run 'node migrate.js'
* profit