Skip to content

Instantly share code, notes, and snippets.

View mbejda's full-sized avatar
🎯
Focusing

Milos Bejda mbejda

🎯
Focusing
View GitHub Profile
@mbejda
mbejda / gist:fac59b9e43ea20f27351
Last active August 29, 2015 14:25 — forked from frozeman/gist:b3f016de58b04c99cfc3
PhantomJS Async Steps Pattern
var page = new WebPage(), testindex = 0, loadInProgress = false;
page.onConsoleMessage = function(msg) {
console.log(msg);
};
//This sets loadInProgress to true when a form is submitted and the page gets redirected.
page.onNavigationRequested = function() {
loadInProgress = true;
}
page.onLoadStarted = function() {
import montylingua.JMontyLingua; // loads namespace
public class Sample {
public static JMontyLingua j = new JMontyLingua();
public static void main(String[] args) {
Sample t = new Sample();
String text = "California's officials were optimistic Monday about the full containment of the devastating wildfires that held 27,000 US residents displaced in southern California. All fires were expected to be surrounded by Tuesday, if not by Monday evening, said Andrea Tuttle, director of the California Department of Forestry and Fire Protection. Continued cooler weather associated with the rain, snow and freezing temperatures at night helped exhausted firefighters claimvictory over raging wildfires in the past days, Tuttle said, adding that \"the weather continues to be healthy for us.\" About half of the 14,000 firefighters remained in the front tocombat forest fires in an area ranging from San Diego to San Bernardion in southern California till Monday. The Old Fire, the last of the wildfires that once thr
@mbejda
mbejda / Top-400-Twitch-Account-With-Twitter-Handles.csv
Last active October 26, 2015 17:06
Top 400 Gaming Twitch Accounts With Twitter Handles (twitch,twitter,type,domain)
twitch twitter type domain
blondiewondie blondiewondie1 gamer
daithidenogla gamer
morberplz morberplz gamer
g5taz g5taz gamer
thegamingterroriser TTerroriser gamer
fantabobshow gamer
ailahdiyenriven lvntblm91 gamer
aces_tv aceswot gamer aces.gg
mojang gamer
@mbejda
mbejda / gist:ead8162a62bf7f89871e
Created October 26, 2015 19:10
Mareks demographics
[{
name: 'Raspberry Pi Foundation',
twitter: 'Raspberry_Pi',
domain: 'raspberrypi.org',
description: 'The Raspberry Pi is a tiny and affordable computer that you can use to learn programming through fun, practical projects. Join the global Raspberry Pi Community.'
}, {
name: 'Gartner',
twitter: 'Gartner_inc',
domain: 'gartner.com',
keywords: 'Technology, research, technology research, IT research, technology consulting, IT consulting, IT, IT industry, technology industry, CIOs, analysts, technology analysts, IT analysts, IT cost cutting, applications, enterprise architecture, information security, IT modernization, virtualization, social computing, cloud computing',
@mbejda
mbejda / navigation.html
Last active November 28, 2015 20:28
Yaui Navigation Menu
<nav class="ui menu-notification">
<div class="col-2-12">
<h2>Branding </h2>
</div>
<div class="col-10-12">
<ul class="pull-right " yauimenu>
<li class=""><a ng-href="#/" href="#/">Page 1</a></li>
<li class=""><a ng-href="#/page2" href="#/grid">Page 2</a></li>
<li class="active"><a ng-href="#/page3" href="#/components">Page 3</a></li>
</ul>
@mbejda
mbejda / yauisteps.html
Created November 28, 2015 20:35
yaui steps
<yauisteps current="current" steps="steps"></yauisteps>
@mbejda
mbejda / slider.html
Created November 28, 2015 20:54
yaui-slider
<yauislider
data-floor="100"
data-ceiling="1000"
data-step="50"
data-precision="2"
data-ng-model="ngmodel"></yauislider>
@mbejda
mbejda / hashtag.tsv
Created December 3, 2015 12:42
2-column TSV file: the first column contains the hashtag, while the second contains the category to which the hashtag belongs to.
spicy food
coffeeaddict food
orange food
chocolate food
fish food
fries food
potato food
food food
tasty food
foodie food
@mbejda
mbejda / probs.js
Created December 5, 2015 03:17
postTagger probs
var OpenNLP = require('opennlp');
/*
Point the doccat model to our trained NLP model.
*/
var posTagger = new OpenNLP().posTagger
posTagger.tag("Spend your weekend getting out instead of stuck in the mall.",function(error,tags){
@mbejda
mbejda / coldfusion.cf
Created December 14, 2015 19:25
Coldfusion: Publishing Photo To Facebook
<cfset accessToken = "#Attributes.accessToken#">
<cfset sourcePath = "#Attributes.sourcePath#">
<cfset pageId = "#Attributes.pageId#">
<cfset text = "#Attributes.text#">
<cfset facebookGraphAPIPage = createObject('component','/lib/facebook-cf-sdk-master/sdk/FacebookGraphApi').init(accessToken=accessToken,appId= request.facebookAppId)>
<cfimage
name="temp"
action="read"
source="#ExpandPath( './assets/images/placeholder/#sourcePath#' )#"