This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'httparty' | |
require 'builder' | |
class MoipClient | |
include HTTParty | |
CONFIG = YAML.load_file(File.join(Rails.root, 'config', 'moip.yml'))[Rails.env] | |
STATUS = { 1 => "authorized", 2 => "started", 3 => "printed", 4 => "completed", 5 => "canceled", 6 => "analysing", 7 => "returned" } | |
base_uri "#{CONFIG["uri"]}/ws/alpha" | |
basic_auth CONFIG["token"], CONFIG["key"] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
mkdir php | |
cd php | |
apt-get source php5 | |
cd php5-<Your-Version-Here>/ext/pcntl | |
# Example: cd php5-5.5.9+dfsg/ext/pcntl | |
phpize | |
./configure | |
make |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- coding: utf-8 -*- | |
import sys | |
from csv import reader as csv_reader | |
from string import punctuation | |
from nltk import sent_tokenize, word_tokenize | |
from nltk.util import ngrams | |
from collections import Counter | |
# init config vars | |
lang = "portuguese" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script type="text/javascript"> | |
function getQueryStringValue(key) { | |
var search = window.location.search; | |
var encodedKey = encodeURIComponent(key).replace(/[\.\+\*]/g, '\\$&'); | |
var test = new RegExp('^(?:.*[&\\?]' + encodedKey + '(?:\\=([^&]*))?)?.*$', 'i'); | |
return decodeURIComponent(search.replace(test, '$1')); | |
}; | |
function updateQueryStringParameter(uri, key, value) { | |
var re = new RegExp('([?&])' + key + '=.*?(&|$)', 'i'); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import TalkieSpark from './talkie-spark'; | |
const chat = new TalkieSpark('tenantA', { | |
apiKey: '***', | |
authDomain: ''***',', | |
databaseURL: ''***',', | |
projectId: ''***',', | |
storageBucket: ''***',', | |
messagingSenderId: ''***',', | |
}); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
NODE_ENV=development | |
HOST=0.0.0.0 | |
PORT=1880 |