Skip to content

Instantly share code, notes, and snippets.

View chachra's full-sized avatar

Sumit Chachra chachra

  • CapeZero
  • San Francisco, CA 94115
  • 15:00 (UTC -07:00)
  • LinkedIn in/chachra
View GitHub Profile
require 'rubygems'
require 'mechanize'
FIRST_NAME = 'FIRST_NAME'
LAST_NAME = 'LAST_NAME'
PHONE = 'PHONE'
EMAIL = 'EMAIL@provider.com'
PARTY_SIZE = 2
SCHEDULE_RANGE = { :start_time => '19:00', :end_time => '20:30' }
@staltz
staltz / introrx.md
Last active May 7, 2024 09:38
The introduction to Reactive Programming you've been missing
@marktheunissen
marktheunissen / pedantically_commented_playbook.yml
Last active April 26, 2024 23:26 — forked from phred/pedantically_commented_playbook.yml
Insanely complete Ansible playbook, showing off all the options
This playbook has been removed as it is now very outdated.
@lucasfais
lucasfais / gist:1207002
Created September 9, 2011 18:46
Sublime Text 2 - Useful Shortcuts

Sublime Text 2 – Useful Shortcuts (Mac OS X)

General

⌘T go to file
⌘⌃P go to project
⌘R go to methods
⌃G go to line
⌘KB toggle side bar
⌘⇧P command prompt
@jo
jo / js-crypto-libraries.md
Last active March 31, 2024 20:33
List of JavaScript Crypto libraries.

JavaScript Crypto Libraries

List some crypto libraries for JavaScript out there. Might be a bit out dated. Scroll to the bottom.

WebCryptoAPI

http://www.w3.org/TR/WebCryptoAPI/

This specification describes a JavaScript API for performing basic cryptographic operations in web applications, such as hashing, signature generation and verification, and encryption and decryption. Additionally, it describes an API for applications to generate and/or manage the keying material necessary to perform these operations. Uses for this API range from user or service authentication, document or code signing, and the confidentiality and integrity of communications.

@csuzw
csuzw / index.js
Created November 7, 2019 10:49
Azure AD Single Sign On with Cypress
// This goes in cypress/plugins/index.js
const AzureAdSingleSignOn = require('./azure-ad-sso/plugin').AzureAdSingleSignOn
module.exports = (on, config) => {
on('task', {AzureAdSingleSignOn:AzureAdSingleSignOn})
}
@marcelkornblum
marcelkornblum / export_repo_issues_to_csv.py
Last active December 18, 2023 20:20 — forked from unbracketed/export_repo_issues_to_csv.py
Export Issues from Github repo to CSV (API v3)
"""
This is strongly based on https://gist.github.com/unbracketed/3380407;
thanks to @unbracketed and the various commenters on the page.
I've mainly cleaned up the code into basic methods, and included the
various suggestions in the comments. Hope this is useful to someone.
Make sure you have `requests` and `csv` installed via pip then run it:
`python export_gh_issues_to_csv.py`
@gcatlin
gcatlin / gist:1847248
Created February 16, 2012 19:43
Install specific version of Homebrew formula
brew update
brew versions FORMULA
cd `brew --prefix`
git checkout HASH Library/Formula/FORMULA.rb # use output of "brew versions"
brew install FORMULA
brew switch FORMULA VERSION
git checkout -- Library/Formula/FORMULA.rb # reset formula
## Example: Using Subversion 1.6.17
#
@strogonoff
strogonoff / middleware.py
Created November 16, 2011 08:56
Django middleware for cross-domain XHR. WARNING: Defaults are unsafe here. Make sure to set proper restrictions in production!
from django import http
try:
from django.conf import settings
XS_SHARING_ALLOWED_ORIGINS = settings.XS_SHARING_ALLOWED_ORIGINS
XS_SHARING_ALLOWED_METHODS = settings.XS_SHARING_ALLOWED_METHODS
XS_SHARING_ALLOWED_HEADERS = settings.XS_SHARING_ALLOWED_HEADERS
XS_SHARING_ALLOWED_CREDENTIALS = settings.XS_SHARING_ALLOWED_CREDENTIALS
except AttributeError:
XS_SHARING_ALLOWED_ORIGINS = '*'
from django.contrib.admin import ModelAdmin
class MyTableAdmin(ModelAdmin):
...
paginator = LargeTablePaginator
...