Skip to content

Instantly share code, notes, and snippets.

View bdcorps's full-sized avatar
🎯
Focusing

Sukhpal Saini bdcorps

🎯
Focusing
View GitHub Profile
@rowlandekemezie
rowlandekemezie / ajaxWithReduxSaga.js
Last active June 26, 2024 09:36
A basic implementation of AJAX with redux-saga
const { applyMiddleware, createStore } = Redux;
const createSagaMiddleware = ReduxSaga.default;
const { put, call } = ReduxSaga.effects;
const { takeLatest } = ReduxSaga;
const { connect, Provider } = ReactRedux;
// GitHub API
const gitHubApi = (username) => {
return fetch(`https://api.github.com/users/${username}`)
.then(response => {
@fontanon
fontanon / app.js
Created February 20, 2015 17:45
NodeJS Passport-LDAPAuth Express test
var express = require('express'),
passport = require('passport'),
bodyParser = require('body-parser'),
LdapStrategy = require('passport-ldapauth');
// Credentials from the free LDAP test server by forumsys
// More info at: http://www.forumsys.com/tutorials/integration-how-to/ldap/online-ldap-test-server/
var OPTS = {
server: {
url: 'ldap://ldap.forumsys.com:389',
@CristinaSolana
CristinaSolana / gist:1885435
Created February 22, 2012 14:56
Keeping a fork up to date

1. Clone your fork:

git clone git@github.com:YOUR-USERNAME/YOUR-FORKED-REPO.git

2. Add remote from original repository in your forked repository:

cd into/cloned/fork-repo
git remote add upstream git://github.com/ORIGINAL-DEV-USERNAME/REPO-YOU-FORKED-FROM.git
git fetch upstream