Skip to content

Instantly share code, notes, and snippets.

using HtmlAgilityPack;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Text.RegularExpressions;
using System.Threading.Tasks;
namespace h2x
{
@baio
baio / gen-icon.sh
Created September 24, 2014 06:03
gen-icon.sh (gen-con.bat) | run `gen-icon src.jpg[png] black` | run `gen-screen src.jpg[png] black` | imagemagic must be installed (choco install imagemagic - for windows) | cordova 3.6.3-0.2.13, ionic 1.1.9
#!/bin/bash
# Generate PhoneGap icon and splash screens.
# Copyright 2013 Tom Vincent <http://tlvince.com/contact>
usage() { echo "usage: $0 icon colour [dest_dir]"; exit 1; }
[ "$1" ] && [ "$2" ] || usage
[ "$3" ] || set "$1" "$2" "."
devices=android,bada,bada-wac,blackberry,ios,webos,windows-phone
@baio
baio / WP8-cordova-oauth.js
Created September 22, 2014 07:42
Dirty fix for WP8 + cordova + oauth.io js (Look for //FIX WP8)
(function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);throw new Error("Cannot find module '"+o+"'")}var f=n[o]={exports:{}};t[o][0].call(f.exports,function(e){var n=t[o][1][e];return s(n?n:e)},f,f.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(require,module,exports){
module.exports = {
oauthd_url: "https://oauth.io",
oauthd_api: "https://oauth.io/api",
version: "web-0.2.4",
options: {}
};
},{}],2:[function(require,module,exports){
"use strict";
@baio
baio / Cordova WP8
Created September 22, 2014 03:43
Cordova WP8
<!--
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
POST /subjects/person/_search
{
"size": 20,
"sort": {
"_score": {
"order": "desc"
}
},
"query": {
"bool": {
#Default render engine, use `jsrender` templates to generate partial views
define ->
_getViewFullPath = null
#get real path by virtual, could be omitted
setGetViewPath = (getViewPathFunc) ->
_getViewFullPath = getViewPathFunc
{
"title": "qlanir.new setup",
"visbility": "public"
}
{
"title": "qlanir.new",
"visbility": "public"
}
{
"title": "Setup qlanir project on local machine.",
"visbility": "public"
}
{
"title": "QLight Project Structure",
"visbility": "public"
}