Skip to content

Instantly share code, notes, and snippets.

View looneym's full-sized avatar
im in ur ifra breakin ur services

Micheál Looney looneym

im in ur ifra breakin ur services
View GitHub Profile
module IntercomUtil
require 'intercom'
@intercom = TOKEN)
def self.get_all_conversations
open_convos = @intercom.conversations.find_all(open: true)
closed_convos = @intercom.conversations.find_all(open: false)
looneym / docker-compose.yml
Created July 9, 2017 02:48 — forked from EloB/docker-compose.yml
Docker compose yml hello world example
image: ubuntu:14.04
command: /bin/echo 'Hello world'
<summary>Summary Goes Here</summary>
original = raw_input("Enter a word")
if len(original) >= 0 and original.isalpha():
print original
print "empty"
looneym /
Created May 14, 2017 16:37
Create a branch in a remote repo using the Github API. Uses token auth.
import requests
import os
import json
TOKEN = os.environ['GH']
HASH = ''
REPO = ''
import sys
from twisted.web.static import File
from twisted.python import log
from twisted.web.server import Site
from twisted.internet import reactor
from autobahn.twisted.websocket import WebSocketServerFactory, \
from autobahn.twisted.resource import WebSocketResource
looneym /
Created April 4, 2017 21:20
Hackathon Ideas Generator
import random
part1 = ["machine learning solution" , "recursive algorithm" , "e-portal" , "cross platform app" , "revolutionary supply chain management platform", "real-time code sharing tool" , "distributed solutions matrix", "backwards compatible hardware driver", "protocol suite"]
part2 = ["LGBT assylum seekers", "obese children", "the homeless" ,"the elderly", "rural communities" , "young people in disadvantaged areas", ]
part3 = ["bespoke twitter API","Big Data", "the Cloud", "open source software","obfuscated code" , "bitcoin mining", "a deep web neural network", "social media", "distributed networks", "node.js" ,]
rand1 = random.randrange(0,len(part1))
rand2 = random.randrange(0,len(part2))
rand3 = random.randrange(0,len(part3))
looneym /
Created April 3, 2017 12:46
How to create an admin initiated conversation in Intercom using the Python SDK
from intercom.client import Client
intercom = Client(personal_access_token='my_personal_access_token')
"message_type": "inapp",
"body": "What's up :)",
"from": {
"type": "admin",
"id": "1234"
looneym /
Last active February 22, 2017 16:30
Base scoped token API operations
import io.intercom.api.Intercom;
import io.intercom.api.User;
public class Test {
public static void main(String[] args){
// Create a user
User user = new User()