Skip to content

Instantly share code, notes, and snippets.

View gist:06817516f352fd5bcc12
[jeffmc@origin ~]$ ip -a
Option "-a" is unknown, try "ip -help".
[jeffmc@origin ~]$ ip a
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
valid_lft forever preferred_lft forever
inet6 ::1/128 scope host
valid_lft forever preferred_lft forever
2: enp0s3: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP qlen 1000
View gist:30f4ec3cb9806223b6f4
<>, both not included in range,
<=>, both included
<==, left not included,
==> right not included
infix operator <> {}
infix operator <=> {}
infix operator ==> {}
infix operator <== {}
@mreidsma
mreidsma / about.markdown
Created Aug 25, 2015
Reformat silly tables in WebPAC Pro Advanced Search
View about.markdown

In III's terrible OPAC, WebPAC Pro, the Advanced Search screen has all these little nested tables that just hold one label in a table cell and an imput in another. There is no reason they should be tables! So I wrapped each of the tokens in the Web Master with an id, and then wrote this silly function to remove the table markup and just give me labels and form elements. Then I used CSS to make it look the way it should, since this is 2015 and not 1997.

The fact that I had to write this function boggles my mind.

View gist:8db6ae8d92adc022b9e8
===========================================================================
====> Running Q/A tests (stage-qa)
Error: Bad linking on [libedit.so.7] please add USES=libedit
Error: Bad linking on [libedit.so.7] please add USES=libedit
Error: Bad linking on [libedit.so.7] please add USES=libedit
Error: Bad linking on [libedit.so.7] please add USES=libedit
Error: Bad linking on [libedit.so.7] please add USES=libedit
Error: Bad linking on [libedit.so.7] please add USES=libedit
Error: Bad linking on [libedit.so.7] please add USES=libedit
Error: Bad linking on [libedit.so.7] please add USES=libedit
@raelik
raelik / steps.txt
Created Aug 25, 2015
Using jruby-gradle to create a jruby+dependencies jar, and still have your application code live directly on the filesystem
View steps.txt
Assuming that you're using jruby-gradle 1.0.3, you'll need to take these steps:
1. In your build.gradle, in addition to your gems dependencies, you'll need:
jrubyJar {
initScript runnable()
}
configurations {
jrubyJar {
View eloquentJs_chapter2ex02.js
// FizzBuzz
for (var i = 0; i <= 100; i++){
var results = "";
if(i % 3 === 0) results += "Fizz";
if(i % 5 === 0) results += "Buzz";
console.log(results || i);
}
@sinapse1987
sinapse1987 / gist:75796bee967bc9494253
Last active Aug 25, 2015 — forked from ianbarber/gist:5170508
Example Sign In activity for Google+ Sign-In on Android
View gist:75796bee967bc9494253
package com.example.anothersignintest;
import java.io.IOException;
import com.google.android.gms.auth.GoogleAuthException;
import com.google.android.gms.auth.GoogleAuthUtil;
import com.google.android.gms.auth.UserRecoverableAuthException;
import com.google.android.gms.common.Scopes;
import com.google.android.gms.common.ConnectionResult;
import com.google.android.gms.common.GooglePlayServicesClient.ConnectionCallbacks;
@kknights
kknights / eloquentJs_chapter2ex01.js
Last active Aug 25, 2015
EJ - Looping a triangle
View eloquentJs_chapter2ex01.js
// Looping a triangle
var results = "";
for (var i = 0; i <= 7; i++) {
console.log(results += "#");
}
@digizeph
digizeph / PlainGraph.java
Created Aug 25, 2015
Simple graph visualization using graphstream library.
View PlainGraph.java
package visualization;
import org.graphstream.graph.Graph;
import org.graphstream.graph.Node;
import org.graphstream.graph.implementations.SingleGraph;
import java.util.Iterator;
public class PlainGraph {
public static void main(String args[]) {
@AlanPew
AlanPew / index.html
Last active Aug 25, 2015
mapbox browser support
View index.html
<!DOCTYPE html>
<html>
<head>
<meta charset='utf-8' />
<title></title>
<meta name='viewport' content='initial-scale=1,maximum-scale=1,user-scalable=no' />
<script src='https://api.tiles.mapbox.com/mapbox-gl-js/v0.9.0/mapbox-gl.js'></script>
<link href='https://api.tiles.mapbox.com/mapbox-gl-js/v0.9.0/mapbox-gl.css' rel='stylesheet' />
<style>
body { margin:0; padding:0; }