Skip to content

Instantly share code, notes, and snippets.

View brianherman's full-sized avatar

brian herman brianherman

  • A Cons Apart
  • Chicago, Illinois
View GitHub Profile
from flask import Flask
import cStringIO
app = Flask(__name__)
import string
@app.route('/k/', methods=['POST'])
def work_with_data():
print request.form # here's post data in a dict - do what you will...
f = open(name, 'w')
output = cStringIO.StringIO()
FileSystemStatCache.cpp: In static member function 'static bool clang::FileSystemStatCache::get(const char*, stat&, bool, int*, clang::FileSystemStatCache*)':
FileSystemStatCache.cpp:63: error: 'OpenFileForRead' is not a member of 'llvm::sys::fs'
make[2]: *** [/root/llvm-3.3.src/tools/clang/lib/Basic/Release+Asserts/FileSystemStatCache.o] Error 1
private static void printInstrumentation(Properties properties) {
Iterator<Object> keys = properties.keySet().iterator();
while (keys.hasNext()) {
String key = (String) keys.next();
String property = properties.getProperty(key);
System.out.println(key + " : " + property);
}
}
Traceback (most recent call last):
File "karmadecay.py", line 23, in <module>
submission.remove()
File "/usr/local/lib/python2.7/dist-packages/praw/decorators.py", line 313, in wrapped
if mod and not is_mod_of_all(obj.user, subreddit):
File "/usr/local/lib/python2.7/dist-packages/praw/decorators.py", line 276, in is_mod_of_all
mod_subs = user.get_cached_moderated_reddits()
File "/usr/local/lib/python2.7/dist-packages/praw/objects.py", line 763, in get_cached_moderated_reddits
for sub in self.reddit_session.get_my_moderation(limit=None):
File "/usr/local/lib/python2.7/dist-packages/praw/__init__.py", line 463, in get_content
package org.discordpvp;
import org.bukkit.command.Command;
import org.bukkit.command.CommandSender;
import org.bukkit.entity.Player;
import org.bukkit.plugin.java.JavaPlugin;
import org.bukkit.potion.PotionEffect;
public class KitchenSink extends JavaPlugin{
@Override
public boolean onCommand(CommandSender sender, Command cmd, String label, String[] args) {
kits:
gold:
delay: 172800
items:
- 306 1 protection:1 unbreaking:2
- 307 1 protection:1 unbreaking:2
- 308 1 protection:1 unbreaking:2
- 309 1 protection:1 unbreaking:2
- 276 1 sharpness:2
- 256 1 efficiency:3
etherpad.createAuthorIfNotExistsFor(author_args, function(error, a) {
if (error) console.error('error creating author' + error.message)
else {
console.log("author created with ID: " + a.authorID)
var group_args = {
groupMapper: req.user.id
}
// Create an group if it doesnt exist or get an author from the etherpad instance
etherpad.createGroupIfNotExistsFor(group_args, function(error, g) {
if (error) console.error('error creating group' + error.message)
#include <stdio.h>
#include <sys/types.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <arpa/inet.h>
#include <netdb.h>
#include <string.h>
#include <string.h>
#include <unistd.h>
#include <stdlib.h>
pid_t pid;
pid = fork();
if(pid < 0) {
fprintf(stderr,"Fork Failed");
exit(-1);
}else if( pid==0 ){
}
//in file ClassA.cpp
#include <stdio.h>
class ClassA {
public:
virtual void f( void );
};
class ClassB : public ClassA{
public:
void f( int x = 0);
};