Skip to content

Instantly share code, notes, and snippets.

View nicolas-raoul's full-sized avatar
🙂

Nicolas Raoul nicolas-raoul

🙂
View GitHub Profile
@baturin
baturin / gist:4eda907d3b7dbc9d02c8
Created February 1, 2015 18:50
osm wikovoyage poi
--- /tmp/eB8iAd_AmenityType.java 2015-02-02 00:49:26.055866038 +0600
+++ OsmAnd-java/src/net/osmand/data/AmenityType.java 2015-01-15 22:40:04.441862245 +0600
@@ -46,10 +46,11 @@
public static AmenityType NATURAL = reg("natural", "natural"); // [TAG] natural places, peaks, caves, trees,... //$NON-NLS-1$ //$NON-NLS-2$
public static AmenityType LANDUSE = reg("landuse", "landuse"); // [TAG] landuse //$NON-NLS-1$ //$NON-NLS-2$
public static AmenityType MILITARY = reg("military", "military"); // [TAG] military //$NON-NLS-1$ //$NON-NLS-2$
public static AmenityType OSMWIKI = reg("osmwiki", "osmwiki"); //$NON-NLS-1$
+ public static AmenityType WIKIVOYAGE = reg("wikivoyage", "wikivoyage"); //$NON-NLS-1$
public static AmenityType USER_DEFINED = reg("user_defined", "user_defined"); //$NON-NLS-1$
@martinlau
martinlau / SiteCreator.java
Last active May 23, 2017 08:02
Sample code to create a site in liferay (don't do this)
public class SiteCreator {
public static void createGroup() throws Exception {
// Don't do this!
long groupId = CounterLocalServiceUtil.increment(Group.class.getName());
Group group = GroupLocalServiceUtil.createGroup(groupId);
group.setName("Test Site");
@jpotts
jpotts / addCategory.groovy
Created April 22, 2014 22:44
Add a category to a document in Alfresco using CMIS 1.1 and cmis:item support
def addCategory(documentPath, categoryName) {
println("Adding '" + categoryName + "' to the document at " + documentPath)
rs = session.query("select alfcmis:nodeRef from cm:category where cmis:name = '" + categoryName + "'", false)
if (rs.getTotalNumItems() == 0) {
println("Couldn't find category with name: " + categoryName)
return
}
catId = rs.getAt(0).getPropertyValueById("alfcmis:nodeRef")
@fanqi
fanqi / portlet.xml
Last active July 25, 2017 09:01
line 9-12:hide 'Your request completed successfully.' in liferay-ce-ga6
<portlet>
<portlet-name>demo</portlet-name>
<display-name>demo</display-name>
<portlet-class>xyz.fanqi.demo.portlet.DemoPortlet</portlet-class>
<init-param>
<name>view-template</name>
<value>/portlet/demo/view.jsp</value>
</init-param>
<init-param>
<name>add-process-action-success-action</name>
@IzzySoft
IzzySoft / ASE AutoReview DefaultComments
Last active October 14, 2017 09:49
Default comments for Android.SE to be used with @Benjol's SE-AutoReviewComments
###[Q]App recommendation
Please note that recommendations like *Is there an app for X* are off-topic here (see [What topics can I ask about here?](/help/on-topic) for details). For where your question might fit better, you might want to look into [Where can I ask questions that aren't Android Enthusiast questions?](//android.meta.stackexchange.com/q/371/16575) and [Where to ask for app recommendations?](//android.meta.stackexchange.com/q/2060/16575).
###[Q]Low question quality
We will need much more information to give good recommendations here. Please [edit] your question and include at least: The device you're using, Android version it is running. Also check and update the tags you've used to match your issue.
###[Q]Development question
This site is for *users* of Android, which means that questions about development/programming are off-topic here (see the [What topics can I ask about here?](/help/on-topic)). Development questions are on-topic on our sister site [Stack Overflow](//stackoverflow.com/questi
@PkmX
PkmX / nexus5.xml
Created May 25, 2015 03:48
Nexus 5 Lens Calibration
<lensdatabase version="1">
<camera>
<maker>LGE</maker>
<model>Nexus 5</model>
<mount>lgeNexus5</mount>
<cropfactor>7.61</cropfactor>
</camera>
<lens>
<maker>LGE</maker>
@yehara
yehara / MessageStartClient.java
Created September 28, 2011 03:14
Questetra BPM Suite のメッセージ開始イベントを起動するサンプルコード(Java)
package com.questetra;
import java.io.IOException;
import java.io.UnsupportedEncodingException;
import java.util.ArrayList;
import java.util.List;
import org.apache.http.HttpEntity;
import org.apache.http.HttpResponse;
import org.apache.http.NameValuePair;
ja:
errors:
messages:
not_found: "は見つかりませんでした"
# not_found: "not found"
already_confirmed: "は既に登録済みです"
# already_confirmed: "was already confirmed"
not_locked: "は凍結されていません"
# not_locked: "was not locked"
@hecomi
hecomi / str2yomi.cpp
Created February 7, 2012 14:43
文章をローマ字読みに変換
#include <iostream>
#include <string>
#include <map>
#include <vector>
#include <boost/shared_ptr.hpp>
#include <boost/spirit/include/qi.hpp>
#include <boost/regex.hpp>
#include <boost/range/adaptor/transformed.hpp>
#include <unicode/translit.h>
#include <mecab.h>
@IzzySoft
IzzySoft / ff57_addons.md
Last active June 1, 2022 16:40
Firefox 57+ Addon Compatibility / Replacements

Mozilla is doing it again: detering the addon developers who once made it „big“ (last time was when they forced them from XUL to their new „stable API“ for „long-time compatibility“ – which then proved to change as often as the XUL did before). So again, many of them are „jumping boat“, as they a) have no time to migrate to the new WebExtensions, b) WebExtensions don't offer the APIs required to perform the tasks needed by their addon, c) WebExtensions not even being ready yet (with just a couple of weeks left to the deadline, the API is still changing and far from being completed).

I won't start a rant on „if I wanted a browser that looks like Chrome (Aurora with FF29), behaves like Chrome (only signed addons via a central store), and now feels like Chrome, I'd use Chrome“. Of course that's true, and having to re-configure ~80% of the browser of course lets me consider changing to a different browser (certainly not Chrome, though). But first let's look where we stand (comments, additions and suggestions wel