Want to create a Gist from your editor, the command line, or the Services menu? Here's how.
This file contains 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 java.util.ArrayList; | |
import java.util.List; | |
import org.easymock.EasyMock; | |
import org.easymock.IExpectationSetters; | |
import org.json.JSONArray; | |
import org.json.JSONObject; | |
import twitter4j.Paging; | |
import twitter4j.RateLimitStatus; |
Microsoft partnered with Canonical to create Bash on Ubuntu on Windows, running through a technology called the Windows Subsystem for Linux. Below are instructions on how to set up the ssh server to run automatically at boot.
- Edit the
/etc/ssh/sshd_config
file by running the commandsudo vi /etc/ssh/sshd_config
and do the following- Change
Port
to 2222 (or any other port above 1000) - Change
PasswordAuthentication
to yes. This can be changed back to no if ssh keys are setup.
- Change
- Restart the ssh server:
sudo service ssh --full-restart
- With this setup, the ssh server must be turned on every time you run Bash on Ubuntu on Windows, as by default it is off. Use this command to turn it on:
This file contains 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
cd ~ | |
sudo yum update | |
sudo yum install java-1.7.0-openjdk.i686 -y | |
wget https://github.com/downloads/elasticsearch/elasticsearch/elasticsearch-0.19.9.tar.gz -O elasticsearch.tar.gz | |
tar -xf elasticsearch.tar.gz | |
rm elasticsearch.tar.gz | |
mv elasticsearch-* elasticsearch | |
sudo mv elasticsearch /usr/local/share |
This file contains 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
// this setup assumes you are using gulp-config for file.src & file.dest | |
// but can be adapted to vanilla easily. | |
'use strict'; | |
var transform = require('vinyl-transform'), | |
browserify = require('browserify'), | |
watchify = require('watchify'), | |
// consider using gulp-load-plugins |
This file contains 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
/* | |
* Licensed to Jörg Prante and xbib under one or more contributor | |
* license agreements. See the NOTICE.txt file distributed with this work | |
* for additional information regarding copyright ownership. | |
* | |
* Copyright (C) 2012 Jörg Prante and xbib | |
* | |
* This program is free software; you can redistribute it and/or modify | |
* it under the terms of the GNU Affero General Public License as published | |
* by the Free Software Foundation; either version 3 of the License, or |
This file contains 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
var express = require('express'); | |
var sys = require('sys'); | |
var oauth = require('oauth'); | |
var app = express.createServer(); | |
var _twitterConsumerKey = "YOURTWITTERCONSUMERKEY"; | |
var _twitterConsumerSecret = "YOURTWITTERCONSUMERSECRET"; | |
function consumer() { |
JavaScript Value | JavaScript Type | Java Type | Is Scriptable | Is Function |
---|---|---|---|---|
{a:1, b:['x','y']} |
object |
org.mozilla.javascript.NativeObject |
+ | - |
[1,2,3] |
object |
org.mozilla.javascript.NativeArray |
+ | - |
1 |
number |
java.lang.Double |
- | - |
1.2345 |
number |
java.lang.Double |
- | - |
NaN |
number |
java.lang.Double |
- | - |
Infinity |
number |
java.lang.Double |
- | - |
-Infinity |
number |
java.lang.Double |
- | - |
true |
boolean |
java.lang.Boolean |
- |
NewerOlder