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
@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
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
@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 .fonts.conf
<?xml version="1.0"?>
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
<fontconfig>
<!--
Documented at
http://linux.die.net/man/5/fonts-conf
To check font mapping run the command at terminal
$ fc-match 'helvetica Neue'
@Daniel15
Daniel15 / 1_README.md
Last active May 7, 2019
Complete Google Drive File Picker example
View 1_README.md

Google Drive File Picker Example

This is an example of how to use the Google Drive file picker and Google Drive API to retrieve files from Google Drive using pure JavaScript. At the time of writing (14th July 2013), Google have good examples for using these two APIs separately, but no documentation on using them together.

Note that this is just sample code, designed to be concise to demonstrate the API. In a production environment, you should include more error handling.

See a demo at http://stuff.dan.cx/js/filepicker/google/

@zenorocha
zenorocha / .hyper.js
Last active Jul 10, 2019 — forked from millermedeiros/osx_setup.md
Setup macOS Sierra (10.12)
View .hyper.js
// Future versions of Hyper may add additional config options,
// which will not automatically be merged into this file.
// See https://hyper.is#cfg for all currently supported options.
module.exports = {
config: {
// default font size in pixels for all tabs
fontSize: 14,
// font family with optional fallbacks
@julionc
julionc / 00.howto_install_phantomjs.md
Last active Aug 5, 2019
How to install PhantomJS on Debian/Ubuntu
View 00.howto_install_phantomjs.md

How to install PhantomJS on Ubuntu

Version: 1.9.8

Platform: x86_64

First, install or update to the latest system software.

sudo apt-get update
sudo apt-get install build-essential chrpath libssl-dev libxft-dev
@OzzyCzech
OzzyCzech / .bash_profile
Last active Nov 2, 2018
Install NGINX, PHP-FPM (5.5.6), Mongo and MySql
View .bash_profile
#############################################################################
# current prompt
#############################################################################
# \d – Current date
# \t – Current time
# \h – Host name
# \# – Command number
# \u – User name
# \W – Current working directory (ie: Desktop/)
# \w – Current working directory, full path (ie: /Users/Admin/Desktop)
@hueniverse
hueniverse / gist:7686452
Last active Aug 16, 2019
Walmart Mobile node.js Setup
View gist:7686452

Overview

We run multiple server processes in two data centers. Each process listens on two ports, one for HTTP and one for HTTPS. HTTPS is terminated by Apache prior to reaching node.js. HTTP goes directly from the client to node.js (through a master load balancer). We do not use clusters. We slice our physical servers into thin virtual machines running SmartOS, each with about 3GB of memory designed for a single node.js process.

Our node.js servers are hapi.js servers using the composer functionality and plugins architecture. We have three sets of plugins loaded: mobile web front end experience (single page app), legacy API reverse proxy, and monitoring.

We also serve original node.js services off another server zone which runs closed source plugins using hapi.

Analytics

@noteed
noteed / docker-ovs.md
Last active Apr 17, 2019
Docker - Open vSwitch setup
View docker-ovs.md
You can’t perform that action at this time.