Skip to content

Instantly share code, notes, and snippets.

@pomarec
pomarec / gist:f15fce320604162223de1ce21b5772c6
Last active May 2, 2022 13:32
Example de filtres pour Jonathan
import 'package:flutter/material.dart';
void main() {
runApp(const MyApp());
}
class MyApp extends StatelessWidget {
const MyApp({Key? key}) : super(key: key);
@override
@pomarec
pomarec / gist:9072101
Last active August 29, 2015 13:56
out_elasticsearch_plus_host
# encoding: UTF-8
require 'net/http'
require 'date'
require 'socket'
class Fluent::ElasticsearchOutput < Fluent::BufferedOutput
Fluent::Plugin.register_output('elasticsearch', self)
config_param :host, :string, :default => 'localhost'
config_param :port, :integer, :default => 9200
import datetime
import httplib2
# to see in detail what's going on, uncomment
# httplib2.debuglevel = 4
from apiclient.discovery import build
from oauth2client.client import OAuth2Credentials, OAuth2WebServerFlow
if __name__ == "__main__":
@pomarec
pomarec / circus.ini
Created October 19, 2013 14:07
RessourceWatcher test
[circus]
endpoint = tcp://127.0.0.1:5555
pubsub_endpoint = tcp://127.0.0.1:5556
stats_endpoint = tcp://127.0.0.1:5557
debug = False
[watcher:memeater]
cmd = python memeater.py
numprocesses = 1
@pomarec
pomarec / elems.json
Created August 10, 2012 09:15
Elements
{
"Air": {
"strongerThan": [
"Plants",
"Ice",
"Radioactive"
],
"weakerThan": [
"Diamond",
"Metal",
#import "NSObject+PerformBlock.h"
@interface NSObject (PerformBlockHidden)
- (void)performBlock:(void(^)(void))block;
@end
@implementation NSObject (PerformBlock)
@pomarec
pomarec / pdfSplitter.py
Created April 18, 2012 15:04
Takes a pdf in argument and spit all its pages in differents files.
#!/usr/bin/python
# install pyPdf "sudo pip install pyPdf"
from pyPdf import PdfFileWriter, PdfFileReader
import sys
input1 = PdfFileReader(file(sys.argv[1], "rb"))
for i in range(input1.getNumPages()):
output = PdfFileWriter()
@pomarec
pomarec / hack.sh
Created March 31, 2012 13:09 — forked from erikh/hack.sh
OSX For Hackers
#!/usr/bin/env sh
##
# This is script with usefull tips taken from:
# https://github.com/mathiasbynens/dotfiles/blob/master/.osx
#
# install it:
# curl -sL https://raw.github.com/gist/2108403/hack.sh | sh
#