Skip to content

Instantly share code, notes, and snippets.

Zafar Siddiqi zsiddiqi

  • Canada
Block or report user

Report or block zsiddiqi

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@domenic
domenic / interop.md
Last active Jun 12, 2019
`module.exports =` and ES6 Module Interop in Node.js
View interop.md

module.exports = and ES6 Module Interop in Node.js

The question: how can we use ES6 modules in Node.js, where modules-as-functions is very common? That is, given a future in which V8 supports ES6 modules:

  • How can authors of function-modules convert to ES6 export syntax, without breaking consumers that do require("function-module")()?
  • How can consumers of function-modules use ES6 import syntax, while not demanding that the module author rewrites his code to ES6 export?

@wycats showed me a solution. It involves hooking into the loader API to do some rewriting, and using a distinguished name for the single export.

This is me eating crow for lots of false statements I've made all over Twitter today. Here it goes.

View bash-one-liners.sh
## CHECKING HEADERS AND CERTIFICATE
# curl headers
curl -Iv https://example.com
# check certificate
openssl s_client -connect www.example.com:443
## FIXING FILES PERMISSIONS
# Remove Mac OS X Desktop Services Store files
find . -name ".DS_Store" -exec rm {} \;
# If you accidentally chmod -R 755 on everything revert files to 644
@jakimowicz
jakimowicz / redmine gitlab sync
Created Nov 15, 2012
simple (and dirty) sync between redmine issues and gitlab issues
View redmine gitlab sync
#!/usr/bin/env ruby
require 'faraday'
require 'json'
require 'gitlab'
module Redmine
Host = nil
APIKey = nil
@dlaxar
dlaxar / Install newer ruby version (>= 1.9)
Created Jun 26, 2012
Installing Redmine AND GitLab on CentOS 6.2 (part 2)
View Install newer ruby version (>= 1.9)
curl -O http://ftp.ruby-lang.org/pub/ruby/1.9/ruby-1.9.3-p0.tar.gz
tar xzvf ruby-1.9.3-p0.tar.gz
cd ruby-1.9.3-p0
./configure --enable-shared --disable-pthread --program-suffix n
make && make install
@dlaxar
dlaxar / a. Add the epel repo to yum
Created Jun 26, 2012
Installing Redmine AND GitLab on CentOS 6.2 (part 1)
View a. Add the epel repo to yum
rpm -Uvh http://fedora.aau.at/epel/6/i386/epel-release-6-7.noarch.rpm
View tmux-cheatsheet.markdown

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname
@jbarber
jbarber / LdapAuth.java
Created Jun 11, 2012
LDAP example for searching and simple binding (authentication)
View LdapAuth.java
/*
* First create the keystore (to allow SSL protection) by importing the LDAP
* certificate (cert.pem) with:
* keytool -import -keystore keystore -storepass changeit -noprompt -file cert.pem
*
* You can get the certificate with OpenSSL:
* openssl s_client -connect ldap.server.com:636 </dev/null 2>/dev/null | sed -n '/^-----BEGIN/,/^-----END/ { p }' > cert.pem
*
* Then compile this class with:
* javac LdapAuth.java
@kwharrigan
kwharrigan / mks_git_checkpoints.py
Created Apr 12, 2012
MKS fast-import script for git
View mks_git_checkpoints.py
#!/usr/bin/python
#Copyright (c) 2012 Kyle Harrigan
#
#Permission is hereby granted, free of charge, to any person obtaining a copy
#of this software and associated documentation files (the "Software"), to deal
#in the Software without restriction, including without limitation the rights
#to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
#copies of the Software, and to permit persons to whom the Software is
#furnished to do so, subject to the following conditions:
#
@btoone
btoone / curl.md
Last active Aug 18, 2019
A curl tutorial using GitHub's API
View curl.md

Introduction

An introduction to curl using GitHub's API.

The Basics

Makes a basic GET request to the specifed URI

curl https://api.github.com/users/caspyin
@mklabs
mklabs / bootstrap-plugins.txt
Created Dec 2, 2011
h5bp + twitter bootstrap integration
View bootstrap-plugins.txt
bootstrap-tooltip.js
bootstrap-popover.js
bootstrap-alert.js
bootstrap-button.js
bootstrap-carousel.js
bootstrap-collapse.js
bootstrap-dropdown.js
bootstrap-modal.js
bootstrap-scrollspy.js
bootstrap-tab.js
You can’t perform that action at this time.