Skip to content

Instantly share code, notes, and snippets.

@gp187
gp187 / linkedin-industry-codes.json
Created February 9, 2017 14:03
LinkedIn Full Industry Codes in JSON
[
{"Code": 47,"Groups": "corp, fin","Description": "Accounting"},
{"Code": 94,"Groups": "man, tech, tran","Description": "Airlines/Aviation"},
{"Code": 120,"Groups": "leg, org","Description": "Alternative Dispute Resolution"},
{"Code": 125,"Groups": "hlth","Description": "Alternative Medicine"},
{"Code": 127,"Groups": "art, med","Description": "Animation"},
{"Code": 19,"Groups": "good","Description": "Apparel & Fashion"},
{"Code": 50,"Groups": "cons","Description": "Architecture & Planning"},
{"Code": 111,"Groups": "art, med, rec","Description": "Arts and Crafts"},
{"Code": 53,"Groups": "man","Description": "Automotive"},
@mbajur
mbajur / .md
Created April 29, 2016 07:16
How to create small, unique tokens in Ruby

How to create small, unique tokens in Ruby

That is is basically a "fork" of blog article i'm constantly returning to. It seems that the blog is down:

My choice: Dave Bass’s rand().to_s() trick

Dave Bass proposed this which I picked up for my implementation (here for an 8-chars token):

require 'nokogiri'
require 'open-uri'
# Get a Nokogiri::HTML:Document for the page we're interested in...
doc = Nokogiri::HTML(open('http://www.google.com/search?q=tenderlove'))
# Do funky things with it using Nokogiri::XML::Node methods...
####
@daviddefco
daviddefco / full_linkedin_profile
Last active August 15, 2021 01:33
Code to get access to both basic and full linkedin profiles. You make one execution with the first code block to get token and token secret values and then can remove this code, assign values to variables and get the access_token directly
require 'oauth'
# api_key and api_secret values are got from the registration of your application in LinkedIn:
# http://developer.linkedin.com/
api_key = 'Your API Key'
api_secret = 'Your API Secret'
# access_token and token_secret are known after the first execution code block
access_token = 'The token we get below'
token_secret = 'The token secret we get below'