Skip to content

Instantly share code, notes, and snippets.

View hpcergar's full-sized avatar
✔️
Ready

Héctor Paúl Cervera-García hpcergar

✔️
Ready
View GitHub Profile
@lebedov
lebedov / linkedin_access_oauth1.py
Last active February 13, 2019 02:46
Get LinkedIn access tokens without having to open a web browser.
#!/usr/bin/env python
"""
Get LinkedIn OAuth1 access tokens without having to open a web browser.
Notes
-----
Based upon https://developer.linkedin.com/documents/getting-oauth-token-python
Assumes that the application API key, secret key, user name, and password are stored
@kixorz
kixorz / aws_autoscaling_cron.rb
Created March 20, 2013 22:41
Running cron jobs in AWS Auto Scaling group is tricky. When you deploy the same code and configuration to all instances in the group, cron job would run on all of them. You may not want that. This script detects the first instance in the group and allows only this instance to run the job. IAM user used by this script needs to have permissions to…
#!/usr/bin/env ruby
require 'syslog'
require 'net/http'
require 'aws-sdk'
Syslog.open
AWS.config({
:access_key_id => '<iam user key>',
:secret_access_key => '<iam user secret>'