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
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> | |
<modelVersion>4.0.0</modelVersion> | |
<groupId>net.manish</groupId> | |
<artifactId>scala-simple</artifactId> | |
<version>1.0-SNAPSHOT</version> | |
<name>${project.artifactId}</name> | |
<description>My wonderfull scala app</description> | |
<inceptionYear>2010</inceptionYear> | |
<licenses> | |
<license> |
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
// | |
// How to use: | |
// | |
// 1. Start node: | |
// node nodeproxy.js | |
// 2. Send a URL like this: | |
// http://localhost:8080/http://www.google.com | |
// | |
// Watch www.google.com come through your local HTTP proxy. | |
// |
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
// | |
// A very simple Node.js static file server and Ajax proxy, based on lightnode (https://github.com/ngspinners/lightnode) | |
// | |
// Requirements: | |
// Node.js | |
// npm for the installation of modules | |
// lightnode (installed via npm) | |
// | |
// How to use, with all dependencies in place: | |
// node nodeserver.js [/path/to/the/root/folder] |
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
ssh -i key.pem -v -2 -C -D 4567 -N user@server | |
-2: force SSH v2 protocol | |
-C: enable compression | |
-D <port>: use given local port | |
-N: do not run any command in the remote server | |
-v: verbose mode |
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
// | |
// Compile and run: | |
// scalac isnumber.scala | |
// scala IsNumber | |
// | |
// this is the class that provides the isNumber method when called on java.lang.String | |
class ExtendedString(s:String) { | |
def isNumber: Boolean = s.matches("[+-]?\\d+.?\\d+") | |
} |
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 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
// | |
// How to start the embedded H2 web server in a Play Scala application | |
// | |
org.h2.tools.Server.startWebServer(play.api.db.DB.getConnection()(play.api.Play.current)) | |
// the browser should automatically open but if not, the correct URL is http://192.168.255.11:58024/ | |
// alternatively, this code only starts the web server (and the connection data must be manually provided). The | |
// correct port is 8082 |
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
* List of commits not pushed to origin yet: | |
git log origin/master..master |
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
Sub LangInFrames() | |
scount = ActivePresentation.Slides.Count | |
For j = 1 To scount | |
fcount = ActivePresentation.Slides(j).Shapes.Count | |
For k = 1 To fcount | |
If ActivePresentation.Slides(j).Shapes(k).HasTextFrame Then | |
ActivePresentation.Slides(j).Shapes(k).TextFrame.TextRange.LanguageID = msoLanguageIDEnglishUK | |
End If | |
Next k | |
Next j |
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 https = require('https'); | |
// https://www.yammer.com/api/v1/messages.json | |
var options = { | |
host: 'www.yammer.com', | |
path: '/api/v1/messages.json?access_token=YOUR-OAUTH2-TOKEN', | |
headers: { "Authorization": "Bearer YOUR-OAUTH2-TOKEN" } | |
} | |
var globalRequestId = 1; |
OlderNewer