Skip to content

Instantly share code, notes, and snippets.

Edward Bramanti jadengore

Block or report user

Report or block jadengore

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
View promise-test-example.js
describe('GET potatoes', function() {
it('returns JSON with only authenticated robot\'s potatoes', function(done) {
const objs = {};
const createGlados = function() {
return factory.create('robot').then(function(robot) {
objs.glados = robot;
return robot;
});
};
View generator-example.js
const getRobotData = function*() {
const robot = yield Robot.find({ name: 'Wheatley' });
const response = yield RobotDataAPI.get('/robots/' + robot.id);
return response.body.robot;
});
View simple-promise-example.js
var getRobotData = function () {
var findRobot = function () {
return Robot.find({ name: 'Wheatley' });
};
var makeRequest = function (robot) {
return RobotDataAPI.get('/robots/' + robot.id);
};
return createRobot.then(makeRequest).then(function (response) {
View getEnvironment.js
const getEnvironment = (api) => {
if (process.env.NODE_ENV !== 'staging') {
return api.master();
}
return api.ref(STAGING_RELEASE_NAME) || api.master();
};
View uncle_bob_scribe_oath.md

Uncle Bob - Scribe's Oath

  1. I will not produce harmful code.
    • I will not intentionally write code with bugs.
    • This means: Do your best.
  2. I will not produce code that's not my best.
  3. I will provide with each release a quick, testable & repeatable proof that the code works.
  4. I will not avoid release that will impede progress.
    • Short term rapid releases
  5. I will fearlessly and relentlessly improve the quality of code.
    • I will never make the code worse.
@jadengore
jadengore / willy.md
Last active Aug 31, 2015
touch willy.js
View willy.md

Congratulations Willy! Atom time.

You've listened to Edward, and decided to make the excellent choice to switch to Atom. I love Sublime Text 2, but the community died and updates are now few and far between.

Packages I recommend

  • atom-beautify
  • atom-bootstrap3
  • atom-csscomb
  • color-picker
@jadengore
jadengore / Explanation.md
Created Jan 25, 2015
Clever Average Students per Section
View Explanation.md

Clever Average Students per Section

For the problem, I determined the solution for visible students per section with the DEMO_TOKEN API key to be 24. I made a GET request to the /v1.1/sections route with a few modifiers (limit set to max and distinct set to return student JSON arrays in sections only).

Using Go, I wrote a struct that takes in the 2D array of data, and logic in my main function that increments an info struct that contains total students and sections. I then return the average of this result.

View gist:ee67ad64d02de12ed372
# https://djangosnippets.org/snippets/893/
#!/usr/bin/env python
import ldap
from django.contrib.auth.models import User, Group
AUTH_LDAP_SERVER = 'ldap.server.com'
AUTH_LDAP_BASE_USER = "cn=Manager,dc=ldap,dc=server,dc=com"
AUTH_LDAP_BASE_PASS = "Manager Password"
AUTH_LDAP_BASE = "dc=ldap,dc=server,dc=com"
View Mahdi Guide
Mahdi ROM Install Guide
=======================
## Requirements
- [Mahdi ROM](http://forum.xda-developers.com/showthread.php?t=2590700)
- [Mahdi's custom TWRP (optional)](http://forum.xda-developers.com/showthread.php?t=2770769)
+ [Panel Info for TWRP](http://forum.xda-developers.com/showthread.php?t=2770769)
- [Cloudyfa's Rotation Baseband](http://www.androidfilehost.com/?w=files&flid=12880)
- [PA Gapps](http://forum.xda-developers.com/showthread.php?t=2397942)/[Banks Gapps](https://goo.im/devs/BaNkS/GApps/)
You can’t perform that action at this time.