- using
pkgutil
# list all your installed packages
pkgutil --pkgs
# show your package info
pkgutil --pkg-info
#!/usr/bin/python | |
# | |
#simple app to read string from serial port | |
#and publish via MQTT | |
# | |
#uses the Python MQTT client from the Mosquitto project | |
#http://mosquitto.org | |
# | |
#Andy Piper http://andypiper.co.uk | |
#2011/09/15 |
/* usbreset -- send a USB port reset to a USB device | |
* | |
* Compile using: gcc -o usbreset usbreset.c | |
* | |
* | |
* */ | |
// -------------------------------------- | |
// i2c_scanner | |
// | |
// Version 1 | |
// This program (or code that looks like it) | |
// can be found in many places. | |
// For example on the Arduino.cc forum. | |
// The original author is not known. | |
// Version 2, Juni 2012, Using Arduino 1.0.1 | |
// Adapted to be as simple as possible by Arduino.cc user Krodal |
# Eclipse | |
.classpath | |
.project | |
.settings/ | |
# Intellij | |
.idea/ | |
*.iml | |
*.iws | |
package org.asafary.csv; | |
import com.fasterxml.jackson.annotation.JsonPropertyOrder; | |
@JsonPropertyOrder({ "name", "surname", "shoesize", "gender" }) | |
public class Person { | |
public String name; | |
public String surname; | |
public int shoesize; |
#!/bin/bash | |
# Cisco Anyconnect CSD wrapper for OpenConnect | |
# Enter your vpn host here | |
CSD_HOSTNAME= | |
if [[ -z ${CSD_HOSTNAME} ]] | |
then | |
echo "Define CSD_HOSTNAME with vpn-host in script text. Exiting." | |
exit 1 | |
fi |
// takes a {} object and returns a FormData object | |
var objectToFormData = function(obj, form, namespace) { | |
var fd = form || new FormData(); | |
var formKey; | |
for(var property in obj) { | |
if(obj.hasOwnProperty(property)) { | |
if(namespace) { |
// sample code written to showcase how to use Mockito to mock certain methods to test logic in Singleton classes | |
public class MySingletonClass { | |
// not lazy initiated object. | |
private static final MySingeltonClass INSTANCE = new MySingletonClass(); | |
// can be used by unit test by Mocking it. Mockito invokes this default constructor. | |
@VisibleForTesting | |
MySingletonClass { | |
#!/usr/bin/perl | |
# windytan's pea whistle encoder | |
# http://www.windytan.com/2015/10/pea-whistle-steganography.html | |
# (c) 2015 Oona Räisänen | |
# ISC license | |
use warnings; | |
use strict; | |
my $data = $ARGV[0] // "OHAI!"; |