Skip to content

Instantly share code, notes, and snippets.

<a href="foo" title="bar>baz</a>
<rio:someTag attr1="foo"
attr2="bar"
attr3="baz"
attr4="you get the idea"/>
@kenglxn
kenglxn / gist:9168797
Created February 23, 2014 08:40
grunt test
➜ intent (master) ✗ ∆ grunt test
Running "clean:server" (clean) task
Cleaning .tmp...OK
Running "concurrent:test" (concurrent) task
Running "coffee:dist" (coffee) task
File .tmp/scripts/app.js created.
File .tmp/scripts/app.js.map created.
File .tmp/scripts/controllers/create-intent.js created.

Unfortunately, the Cisco AnyConnect client for Mac conflicts with Pow. And by "conflicts", I mean it causes a grey-screen-of-death kernel panic anytime you connect to the VPN and Pow is installed.

As an alternative, there is OpenConnect, a command-line client for Cisco's AnyConnect SSL VPN.

Here's how to get it set up on Mac OS X:

  1. OpenConnect can be installed via homebrew:

     brew update
    

brew install openconnect

@kenglxn
kenglxn / funshuffle.md
Last active August 29, 2015 14:20
funshuffle for nrk.no

create a bookmarklet with the folllowing content and run it on www.nrk.no

javascript: (function () {
  var txtxtxs = $('body').find('.article-content h3 a'), 
      shuf = [], 
      t,
      tl = txtxtxs.length;
  
 while (shuf.length &lt; tl) {
% This is the RIPE Database query service.
% The objects are in RPSL format.
%
% The RIPE Database is subject to Terms and Conditions.
% See http://www.ripe.net/db/support/db-terms-conditions.pdf
% Note: This output has been filtered.
% To receive output for a database update, use the "-B" flag.
% Information related to '81.27.32.0 - 81.27.33.255'
ep 22, 2010 1:59:36 PM org.glassfish.api.ActionReport failure
SEVERE: Exception while loading the app
org.glassfish.deployment.common.DeploymentException: Java heap space
at org.glassfish.weld.WeldDeployer.event(WeldDeployer.java:169)
at org.glassfish.kernel.event.EventsImpl.send(EventsImpl.java:125)
at org.glassfish.internal.data.ApplicationInfo.load(ApplicationInfo.java:224)
at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:338)
at org.glassfish.kernel.embedded.EmbeddedDeployerImpl.deploy(EmbeddedDeployerImpl.java:214)
at org.jboss.arquillian.container.glassfish.embedded_3.GlassFishEmbeddedContainer.deploy(GlassFishEmbeddedContainer.java:163)
at org.jboss.arquillian.impl.handler.ContainerDeployer.callback(ContainerDeployer.java:62)
T E S T S
-------------------------------------------------------
[ERROR] Testcase: AllserviceSearchModelAllserviceSearchTest.php fails.
[ERROR] See log: /home/ken/dev/git/allservice/target/surefire-reports/AllserviceSearchModelAllserviceSearchTest.txt
Running AllserviceStringUtilsTest
Tests run: 21, Failures: 0, Errors: 0, Time elapsed: 0.027209
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
We couldn’t find that file to show.
package demo.resteasy;
import javax.ws.rs.*;
@Path("foo")
public class Foo{
@Path("{id}")
@GET
public String get(@QueryParam("order") String order, @HeaderParam("X-Foo") String header,
@MatrixParam("colour") String colour, @CookieParam("Foo-Cookie") String cookie){
<?xml version="1.0" encoding="UTF-8"?>
<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>cdi-demo</groupId>
<artifactId>cdi-demo</artifactId>
<packaging>war</packaging>
<name>cdi-demo</name>
<version>1.0</version>