Skip to content

Instantly share code, notes, and snippets.

Avatar
💭
Coding, of course!

Mark Heckler mkheck

💭
Coding, of course!
View GitHub Profile
@mkheck
mkheck / gist:5066119
Created Mar 1, 2013
Using an anonymous inner class for User Info column's cell factory. Associated blog post: https://blogs.oracle.com/javajungle/entry/how_to_pretty_up_your
View gist:5066119
userInfoCol.setCellFactory(new Callback<TableColumn<MTweet, MUser>,
TableCell<MTweet, MUser>>() {
@Override
public TableCell<MTweet, MUser> call(TableColumn<MTweet, MUser> param) {
return new TableCell<MTweet, MUser>() {
VBox vb;
Label userName;
Label screenName;
ImageView imgVw;
@mkheck
mkheck / interfaces
Created Feb 28, 2015
Content of Raspberry Pi (Raspbian) /etc/network/interfaces file for connection to hidden SSIDs
View interfaces
auto lo
iface lo inet loopback
iface eth0 inet dhcp
allow-hotplug wlan0
iface wlan0 inet manual
wpa-roam /etc/wpa_supplicant/wpa_supplicant.conf
iface default inet dhcp
@mkheck
mkheck / wpa_supplicant-HIDDEN
Last active May 1, 2019
Content of Raspberry Pi (Raspbian) /etc/wpa_supplicant/wpa_supplicant.conf file for connection to hidden SSIDs
View wpa_supplicant-HIDDEN
network={
ssid="put_your_hidden_ssid_here"
scan_ssid=1
psk="put_your_password_for_network_here"
mode=0
proto=WPA2
key_mgmt=WPA-PSK
pairwise=CCMP
group=CCMP
auth_alg=OPEN
@mkheck
mkheck / wpa_supplicant.conf-UNHIDDEN
Last active Aug 29, 2015
Entry in Raspberry Pi (Raspbian) /etc/wpa_supplicant/wpa_supplicant.conf file network section for UNhidden SSID
View BasicReadingEntity
package org.thehecklers;
import org.springframework.stereotype.Component;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
@Entity
View BasicReadingRepository
package org.thehecklers;
import org.springframework.data.repository.CrudRepository;
import org.springframework.data.rest.core.annotation.RepositoryRestResource;
@RepositoryRestResource
public interface ReadingRepository extends CrudRepository<Reading, Long> {
}
View curl_POSTreading
curl -X POST -H "Content-Type: application/json" -d "{\"temperature\": 26.0, \"humidity\": 35.0}" localhost:8080/readings
View curl_GETreadings_output
{
"_embedded" : {
"readings" : [ {
"temperature" : 25.0,
"humidity" : 34.0,
"_links" : {
"self" : {
"href" : "http://localhost:8080/readings/1"
},
"reading" : {
View Random Route manifest.yml example
---
applications:
- name: example-app
path: target/example-app-0.0.1-SNAPSHOT.jar
memory: 512M
random-route: true