Skip to content

Instantly share code, notes, and snippets.

Micheál Looney looneym

Block or report user

Report or block looneym

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View intercom_util.rb
module IntercomUtil
require 'intercom'
TOKEN = ENV["INTERCOM_PAT"]
@intercom = Intercom::Client.new(token: TOKEN)
def self.get_all_conversations
open_convos = @intercom.conversations.find_all(open: true)
closed_convos = @intercom.conversations.find_all(open: false)
@looneym
looneym / docker-compose.yml
Created Jul 9, 2017 — forked from EloB/docker-compose.yml
Docker compose yml hello world example
View docker-compose.yml
helloworld:
image: ubuntu:14.04
command: /bin/echo 'Hello world'
View gist:eb53216d1586ca2b0a53d2934f0d024d
<details>
<summary>Summary Goes Here</summary>
```
lol
```
</details>
View raw_input_example.py
original = raw_input("Enter a word")
if len(original) >= 0 and original.isalpha():
print original
else:
print "empty"
@looneym
looneym / main.py
Created May 14, 2017
Create a branch in a remote repo using the Github API. Uses token auth.
View main.py
import requests
import os
import json
TOKEN = os.environ['GH']
NEW_BRANCH_NAME = ''
HASH = ''
AUTHOR= ''
REPO = ''
View app.py
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, \
WebSocketServerProtocol
from autobahn.twisted.resource import WebSocketResource
@looneym
looneym / generator.py
Created Apr 4, 2017
Hackathon Ideas Generator
View generator.py
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
looneym / create_admin_conversation.py
Created Apr 3, 2017
How to create an admin initiated conversation in Intercom using the Python SDK
View create_admin_conversation.py
from intercom.client import Client
intercom = Client(personal_access_token='my_personal_access_token')
intercom.messages.create(**{
"message_type": "inapp",
"body": "What's up :)",
"from": {
"type": "admin",
"id": "1234"
},
@looneym
looneym / Test.java
Last active Feb 22, 2017
Base scoped token API operations
View Test.java
import io.intercom.api.Intercom;
import io.intercom.api.User;
public class Test {
public static void main(String[] args){
Intercom.setToken("super_Secret_token");
// Create a user
User user = new User()
You can’t perform that action at this time.