Skip to content

Instantly share code, notes, and snippets.

Thomas Ferris Nicolaisen tfnico

Block or report user

Report or block tfnico

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View keybase.md

Keybase proof

I hereby claim:

  • I am tfnico on github.
  • I am tfnico (https://keybase.io/tfnico) on keybase.
  • I have a public key ASDkQGs8RbZYJwhOiWGG4FQnZi7zJlsDf8lgDiDRq3nmKwo

To claim this, I am signing this object:

@tfnico
tfnico / README.md
Last active Apr 12, 2018
Cross-compiling Rust for raspberry-pi (with system dependencies)
View README.md

This is a quick guide on how to set up cross-compilation of Rust programs, where you are using Rust libraries that have system level dependencies, like openssl.

We think it's easiest to cross-compile on a 32 bit linux machine. Could be that 64 bit works as well, but since the arm is 32 bit..

Set up cross-compilation according to https://github.com/Ogeon/rust-on-raspberry-pi

It is a bit of work. but make sure you follow the instructions, and keep to the 32 bit options.

@tfnico
tfnico / Something.java
Last active Aug 19, 2016
Send http request using google-http-client
View Something.java
// Related to https://gist.github.com/tfnico/5926374
// and http://stackoverflow.com/questions/14464486/guava-input-output-suppliers-and-urlconnection
static final HttpTransport HTTP_TRANSPORT = new NetHttpTransport();
public void sendMessage(String url, String params){
final HttpURLConnection connection;
try {
HttpRequestFactory requestFactory = HTTP_TRANSPORT.createRequestFactory();
@tfnico
tfnico / gist:49b420562d886b693ce5
Created Jan 30, 2015
gradle-application-plugin launch script
View gist:49b420562d886b693ce5
#!/usr/bin/env bash
##############################################################################
##
## start up script for UN*X
##
##############################################################################
# Add default JVM options here. You can also use JAVA_OPTS and APP_OPTS to pass JVM options to this script.
DEFAULT_JVM_OPTS='"-Djava.util.logging.config.file=./etc/log.conf" "-Ddatabase.storage.hostname=some-titan"'
@tfnico
tfnico / README.md
Last active Aug 29, 2015
Building and pushing docker images to GiantSwarm from your existing jenkins
View README.md
  • Create a server to work as a Jenkins slave (implying you have an existing Jenkins) on DigitalOcean or whatever you use for getting servers up and running.
  • Install Ubuntu on it, and Java for running the Jenkins slave (current openjdk 7 should work)
  • Create a jenkins user, add a authorized_key that the Jenkins master can use for SSHing to it (see Jenkins docs for more info)
  • Install the latest docker (see Docker docs for info)
  • Add user jenkins to the docker group
  • Do sudo su jenkins, and (with your username/password)
    docker login https://registry.giantswarm.io
@tfnico
tfnico / keybase.md
Created Sep 24, 2014
Keybase proof
View keybase.md

Keybase proof

I hereby claim:

  • I am tfnico on github.
  • I am tfnico (https://keybase.io/tfnico) on keybase.
  • I have a public key whose fingerprint is A72F 92D5 4452 28CA 05C5 F7DE 8B57 C065 E149 47C7

To claim this, I am signing this object:

@tfnico
tfnico / gist:5fd2dfea556d9a357a55
Created Aug 26, 2014
Set JAVA_HOME to whatever jenv says it is on OS X
View gist:5fd2dfea556d9a357a55
#In my .zshrc:
#...
# Normal jenv config
export PATH="$HOME/.jenv/bin:$PATH"
eval "$(jenv init -)"
# Now find the JAVA_HOME for it:
jenv_java=$(jenv global) # yields 'oracle64-1.6.0.54'
echo $jenv_java
jenv_java_without_oracle=${jenv_java#*oracle64-} # yields '1.6.0.54'
@tfnico
tfnico / manifest.pp
Last active Sep 16, 2018
Puppet recipe for installing Java8 on Debian
View manifest.pp
class oracle_java8 {
# This follows the recipe from http://blog.nocturne.net.nz/devops/2013/08/14/provisioning-oracle-java-with-puppet-apply/
# adapted with the instructions from http://www.webupd8.org/2014/03/how-to-install-oracle-java-8-in-debian.html
# define a variable for the webupd8team ppa sources list
$webupd8src = '/etc/apt/sources.list.d/webupd8team.list'
exec {'hello':
unless => "/bin/true",
@tfnico
tfnico / gitminutes-gitblit.md
Last active Aug 29, 2015
Working with GitBlit tickets
View gitminutes-gitblit.md

This is an addendum to GitMinutes #29: James Moger on GitBlit

push HEAD:refs/for/5

This syntax is used for two scenarios.

a. pushing to a ticket that DOES NOT have any commits

b. pushing a rewrite of commits to a ticket that DOES have commits

@tfnico
tfnico / spring-rest-data-problems.md
Last active Aug 29, 2015
Having some problems with upgrading spring-rest-data
View spring-rest-data-problems.md

In the latest release of spring-rest-data (2.0.2), calling the root "descriptor" (/api/) works fine , but calling a GET on any entity (/api/plannedWorkloads) fails with an exception.

It works fine when using spring-rest-data-2.0.0.M1.

When switching to spring-rest-data-2.0.0.RELEASE: https://gist.github.com/tfnico/11243724

When switching tp spring-rest-data-2.0.1.RELEASE: https://gist.github.com/tfnico/11243762

Switching to spring-rest-data-2.0.2.RELEASE gives the same error as in 2.0.1.

You can’t perform that action at this time.