Skip to content

Instantly share code, notes, and snippets.

#include <sys/types.h>
#include <sys/wait.h> // needed to remove warning.
#include <stdio.h>
#include <unistd.h>
#include <string.h>
#define MAX_COMMAND_LENGTH 256
#define MAX_ARGS_LENGTH 256
#define DELIMITER "\x20\n"
#define WAIT_CHARACTER "&"
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/)
# 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"
@ebramanti
ebramanti / Explanation.md
Created January 25, 2015 10:02
Clever Average Students per Section

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.

@ebramanti
ebramanti / willy.md
Last active August 31, 2015 17:41
touch willy.js

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
@ebramanti
ebramanti / uncle_bob_scribe_oath.md
Last active December 20, 2022 14:54
Uncle Bob Scribe's Oath

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.
const getEnvironment = (api) => {
if (process.env.NODE_ENV !== 'staging') {
return api.master();
}
return api.ref(STAGING_RELEASE_NAME) || api.master();
};
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) {
const getRobotData = function*() {
const robot = yield Robot.find({ name: 'Wheatley' });
const response = yield RobotDataAPI.get('/robots/' + robot.id);
return response.body.robot;
});