Skip to content

Instantly share code, notes, and snippets.

View josenaves's full-sized avatar
🏠
Working from home

José Naves Moura Neto josenaves

🏠
Working from home
View GitHub Profile
# sudo gem install mechanize ratom --no-ri --no-rdoc
%W{rubygems mechanize atom/pub net/http}.each { |r| require r }
module Wordpress
# A proof of concept class, displaying how to manage a WP blog through ruby
class Blog
attr_accessor :agent, :blog_uri, :username, :password, :logged_in
def initialize blog_uri, username, password
@username = username
@password = password
@blog_uri = blog_uri.gsub(/\/$/,"") # remove last slash if given
@velocityzen
velocityzen / auth.py
Created September 26, 2011 16:30
This script take pictures from directory and post it to tumblr blog and then delete it. Tumblr API v2! This example for oath file upload.
import urlparse
import oauth2 as oauth
consumer_key = ''
consumer_secret = ''
request_token_url = 'http://www.tumblr.com/oauth/request_token'
access_token_url = 'http://www.tumblr.com/oauth/access_token'
authorize_url = 'http://www.tumblr.com/oauth/authorize'
@aanton
aanton / 10gen-extract-videos.js
Created June 19, 2013 08:43
Get all videos URLs of a week in a course from education.10gen.com using web scrapping, javascript, jquery and browser console
/*
Instructions:
1. Log in with your account and go to the desired course
2. Open the courseware tab
3. Configure the week variable
4. Copy this code and paste it in the browser console
*/
@garethrees
garethrees / plot.p
Last active January 14, 2024 23:21
Graphing apache benchmark results with gnuplot
# Output to a jpeg file
set terminal jpeg size 1280,720
# Set the aspect ratio of the graph
set size 1, 1
# The file to write to
set output "timeseries.jpg"
# The graph title
@rxaviers
rxaviers / gist:7360908
Last active May 23, 2024 20:16
Complete list of github markdown emoji markup

People

:bowtie: :bowtie: 😄 :smile: 😆 :laughing:
😊 :blush: 😃 :smiley: ☺️ :relaxed:
😏 :smirk: 😍 :heart_eyes: 😘 :kissing_heart:
😚 :kissing_closed_eyes: 😳 :flushed: 😌 :relieved:
😆 :satisfied: 😁 :grin: 😉 :wink:
😜 :stuck_out_tongue_winking_eye: 😝 :stuck_out_tongue_closed_eyes: 😀 :grinning:
😗 :kissing: 😙 :kissing_smiling_eyes: 😛 :stuck_out_tongue:
@lelandbatey
lelandbatey / whiteboardCleaner.md
Last active April 25, 2024 02:01
Whiteboard Picture Cleaner - Shell one-liner/script to clean up and beautify photos of whiteboards!

Description

This simple script will take a picture of a whiteboard and use parts of the ImageMagick library with sane defaults to clean it up tremendously.

The script is here:

#!/bin/bash
convert "$1" -morphology Convolve DoG:15,100,0 -negate -normalize -blur 0x1 -channel RBG -level 60%,91%,0.1 "$2"

Results

@staltz
staltz / introrx.md
Last active May 23, 2024 20:07
The introduction to Reactive Programming you've been missing
@andystanton
andystanton / ghost2jekyll.py
Last active July 30, 2017 16:15
Ghost2Jekyll: Converts ghost 0.4.2 sqlite db posts to jekyll 2.3.0 markdown posts.
#!/usr/bin/env python3
# This script is provided to show how I migrated from Ghost 0.4.2
# to Jekyll 2.3.0 and is used at your own risk. Back up your blog
# before trying it out.
def getPostTemplate():
with open('post-template.md', 'r') as f:
posttemplate = f.read()
f.closed
@cesarferreira
cesarferreira / RxJava.md
Last active February 2, 2022 07:28
Party tricks with RxJava, RxAndroid & Retrolambda

View Click

Instead of the verbose setOnClickListener:

RxView.clicks(submitButton).subscribe(o -> log("submit button clicked!"));

Filter even numbers

Observable
    .just(1, 2, 3, 4, 5, 6, 7, 8, 9, 10)
@douglasdrumond
douglasdrumond / sobre trabalhar PJ
Last active March 11, 2016 12:38
Sobre trabalhar PJ (texto compartilhado na comunidade AndroidBrasilDev, não é de minha autoria)
Como você eu tive que pesquisar e entender o que significa trabalhar como PJ
para decidir sobre uma oportunidade.
Bom antes de entender o que significa trabalhar como PJ você deve entender
o que significa trabalhar como CLT e porque as empresas preferem evitar isso.
No CLT vc tem o seu salário bruto digamos que seja R$ 3000. Mas o que você
recebe de verdade é R$ 2603,83
O que acontece é que você tem que pagar do seu salário 11% de INSS R$ 330 mais