Skip to content

Instantly share code, notes, and snippets.

View SebastianThorn's full-sized avatar
💭
🦥 Doing my thing

Sebastian Thörn SebastianThorn

💭
🦥 Doing my thing
View GitHub Profile
@SebastianThorn
SebastianThorn / main.yaml
Created April 24, 2020 13:49
example gist
- name: add several users
user:
name: "{{ item.name }}"
state: present
groups: "{{ item.groups }}"
loop:
- { name: 'testuser1', groups: 'wheel' }
- { name: 'testuser2', groups: 'root' }
@SebastianThorn
SebastianThorn / function.rb
Created March 17, 2014 19:49
classmethods as parameters
#! /usr/bin/env ruby
# -*- coding: utf-8 -*-
def greeter(greet, name)
return "addJob.return: #{greet}, on you #{name}"
end
def x(b)
return b.call("Hello", "Sven")
end
public void saveSettings(View view) {
Log.i("Debug", "@saveSettings");
EditText userEdit = (EditText) findViewById(R.id.textedit_user);
EditText serverEdit = (EditText) findViewById(R.id.textedit_server);
EditText keyEdit = (EditText) findViewById(R.id.textedit_key);
try {
SharedPreferences.Editor editor = settings.edit();
editor.putString("User", userEdit.getText().toString());
editor.putString("Server", serverEdit.getText().toString());
editor.putString("Key", keyEdit.getText().toString());