Skip to content

Instantly share code, notes, and snippets.

@laouji
laouji / csv_column_counter.pl
Created December 11, 2018 13:38
csv column counter script
#!/bin/env perl
use warnings;
use strict;
use Text::CSV;
my $filename = $ARGV[0];
if (!$filename) {
print "filename must be passed as an argument\n";
exit(2);
}
@laouji
laouji / token_generator.pl
Created October 8, 2018 16:46
32 char token generator
#!/usr/bin/env perl
use strict;
use warnings;
my $count = $ARGV[0];
if (!defined $count) {
$count = 1;
}
if ($count !~ m/^\d+$/) {
@laouji
laouji / kinmedai.go
Created July 31, 2016 11:30
kinmedai.go - a quick Google Natural Language API test in go
package main
import (
"bytes"
"database/sql"
"encoding/json"
"flag"
"fmt"
_ "github.com/mattn/go-sqlite3"
"io/ioutil"
@laouji
laouji / goji_httptest_example.go
Last active August 29, 2015 14:25
goji httptest example
package main
import (
"encoding/json"
"net/http"
"net/http/httptest"
"net/url"
"testing"
"github.com/zenazn/goji/web"
@laouji
laouji / mass_on_time_api_result
Created January 31, 2015 06:54
API result for Mass on Time Spice
{
"query-details": {
"type": "any",
"quantity": 10,
"location": {
"strong": true,
"lat": 29.4246002,
"lng": -98.4951405,
"address": "San Antonio, Bexar County, Texas, United States of America"
},