Skip to content

Instantly share code, notes, and snippets.

Mike Gnanakone LAMike310

  • Kone Labs
  • Los Angeles
Block or report user

Report or block LAMike310

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 scip-server.py
import flask
from two1.wallet import Wallet
from two1.bitserv.flask import Payment
import requests
import json
from sys import argv
app = flask.Flask(__name__)
payment = Payment(app, Wallet())
View scip-client.py
#!/usr/bin/env python3
from two1.wallet import Wallet
from two1.bitrequests import BitTransferRequests
# set up bitrequest client for BitTransfer requests
wallet = Wallet()
requests = BitTransferRequests(wallet)
# server address
server_url = 'http://[::1]:5000/'
View scrapeFromConsole.js
artoo.scrape(".link", {
url: {sel: 'a', attr: 'href'}, text: {sel: 'a'}
}, artoo.savePrettyJson);
View scrapeTemplate.js
var axios = require('axios');
var cheerio = require('cheerio')
var url = ""
axios.get(url)
.then(function (response) {
var data = response.data;
var $ = cheerio.load(response.data);
$('').each(function(i, element) {
});
View modulus.js
var express = require('express')
var app = express()
var request = require('request')
var bodyParser = require('body-parser')
app.use(bodyParser.json())
app.get('/hello', function(req, res){
res.send('world!')
})
View gist:31453d98b7b861a160cff623abfb1f47
ubuntu@ip-172-31-24-227:~$ 21 status
Logged in as: satoshisam
Total Balance
Your spendable buffer at 21.co [1] : 97250 satoshis
Your spendable balance on the Blockchain [2] : 0 satoshis
Your spendable balance in Payment Channels : 0 satoshis
Amount flushing from 21.co buffer to Blockchain balance : 0 satoshis
[1]: Available for off-chain transactions
View scriptOutput.js
➜ API git:(master) ✗ node gameData.js
[ { 'Short and formal names': 'A AAA',
'Membership within the UN System [Note 1]': 'A AAA',
'Sovereignty dispute [Note 2]': 'A AAA',
'Further information on status and recognition of sovereignty [Note 3]': '' },
{ 'Short and formal names': 'ZZZ↓ UN member states or observer states ↓',
'Membership within the UN System [Note 1]': 'A AAA',
'Sovereignty dispute [Note 2]': 'ZZZ',
'Further information on status and recognition of sovereignty [Note 3]': '' },
{ 'Short and formal names': 'ZZZAbkhazia → Abkhazia',
@LAMike310
LAMike310 / getVideos.js
Created Mar 26, 2016
Get all videos from a YouTube channel
View getVideos.js
var axios = require('axios')
var Firebase = require('firebase')
var nextPageToken = ''
// Get the YT Channel Playlist ID from here:
// https://www.googleapis.com/youtube/v3/channels?part=contentDetails&forUsername={YOUTUBE_CHANNEL_NAME}&key={YOUR_API_KEY}
function saveVideoData(token) {
var ROOT_URL = "https://www.googleapis.com/youtube/v3/playlistItems?pageToken=" + nextPageToken + "&part=snippet&playlistId=UUzQUP1qoWDoEbmsQxvdjxgQ&key={YOUR_API_KEY}&maxResults=50&?"
axios.get(ROOT_URL)
.then(function (response) {
data = response.data;
View getVideos.js
var axios = require('axios')
var Firebase = require('firebase')
var nextPageToken = ''
// Get the YT Channel Playlist ID from here:
// https://www.googleapis.com/youtube/v3/channels?part=contentDetails&forUsername={YOUTUBE_CHANNEL_NAME}&key={YOUR_API_KEY}
function saveVideoData(token) {
var ROOT_URL = "https://www.googleapis.com/youtube/v3/playlistItems?pageToken=" + nextPageToken + "&part=snippet&playlistId=UUzQUP1qoWDoEbmsQxvdjxgQ&key={YOUR_API_KEY}&maxResults=50&?"
axios.get(ROOT_URL)
.then(function (response) {
data = response.data;
View SatoshiShop.html
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Mike's Card Shop</title>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/materialize/0.97.5/css/materialize.min.css">
<script src="https://cdnjs.cloudflare.com/ajax/libs/vue/1.0.18/vue.min.js"></script>
<script src="https://code.jquery.com/jquery-2.2.2.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/materialize/0.97.5/js/materialize.min.js"></script>
<style>
You can’t perform that action at this time.