This file contains hidden or 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
| # iw wlan0 scan | sed -e 's#(on wlan# (on wlan#g' | awk -f scan.awk | |
| $1 == "BSS" { | |
| MAC = $2 | |
| print $2 | |
| e = wifi[MAC] | |
| e["enc"] = "Open" | |
| } | |
| $1 == "SSID:" { | |
| e = wifi[MAC] | |
| e["SSID"] = $2 |
This file contains hidden or 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
| #!/bin/sh | |
| # Config | |
| HOME_HOSTNAME=destination.host | |
| HOME_PORT=2413 | |
| LOG_BASEDIR=/tmp/wicycle/log | |
| # Scan | |
| NOW=$(date -Iseconds) | |
| HOME_BASEURL=http://$HOME_HOSTNAME:$HOME_PORT |
This file contains hidden or 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
| #!/bin/bash | |
| set -e | |
| INSTALL_ROOT=/home/admin | |
| cd $INSTALL_ROOT | |
| wget http://apache.mirror.iweb.ca/hbase/stable/hbase-0.98.5-hadoop2-bin.tar.gz | |
| tar xzf hbase-*-hadoop2-bin.tar.gz | |
| ln -s hbase-*-hadoop2 hbase | |
| cat > hbase/conf/hbase-site.xml <<EOF | |
| <configuration> | |
| <property> |
This file contains hidden or 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
| #!/bin/sh | |
| INDEX="index.html" | |
| echo "<html>" > $INDEX | |
| if [ -d thumbnails ] ; then | |
| echo "Deleting existing thumbnails directory" | |
| rm -rf thumbnails | |
| fi |
This file contains hidden or 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
| #!/bin/bash | |
| # Find duplicate files | |
| RECURSIVE="no" | |
| TEMPFILE=`mktemp` | |
| DIRECTORY=. | |
| LAST_IS_OPTION="no" |
This file has been truncated, but you can view the full file.
This file contains hidden or 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
| -- | |
| -- PostgreSQL database dump | |
| -- | |
| SET statement_timeout = 0; | |
| SET client_encoding = 'UTF8'; | |
| SET standard_conforming_strings = on; | |
| SET check_function_bodies = false; | |
| SET client_min_messages = warning; |
This file contains hidden or 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
| #!/usr/bin/env ruby | |
| require 'csv' | |
| poste = nil | |
| district = nil | |
| bureau = nil | |
| candidats = [] | |
| puts "CREATE TABLE district (code varchar(1000), primary key (code));" | |
| puts "CREATE TABLE poste (poste_no varchar(6), district varchar(1000) references district(code), primary key (poste_no));" |
This file contains hidden or 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
| <div class="modal-header"> | |
| <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button> | |
| <h3 id="myModalLabel">Modal header</h3> | |
| </div> | |
| <div class="modal-body"> | |
| <form> | |
| <fieldset> | |
| <legend>Legend</legend> | |
| <label>Label name</label> |
This file contains hidden or 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<Sub> listOfSub = null; | |
| List<Super> listOfSuper = null; | |
| List<? extends Super> listOfExtendsSuper = null; // Co-variant list | |
| List<? extends Sub> listOfExtendsSub = null; // Contra-variant list | |
| List<? super Super> listOfSuperSuper = null; | |
| List<? super Sub> listOfSuperSub = null; | |
| listOfSub = listOfSuper; | |
| listOfSub = listOfExtendsSuper; | |
| listOfSub = listOfExtendsSub; // Why? |
This file contains hidden or 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
| // controller | |
| var UsersCtrl = [ '$scope', '$http', 'Restangular', | |
| function($scope, $http, Restangular) { | |
| $scope.users = Restangular.all('users').getList(); | |
| $scope.toggleActive = function(user) { | |
| Restangular.one('users', user.UserId).all('active').post({ | |
| active : user.Active | |
| }); | |
| } |