Skip to content

Instantly share code, notes, and snippets.

Avatar

Erik Behrends behrends

View GitHub Profile
@behrends
behrends / App.js
Created Jul 4, 2018
11:40 - Zitat als Komponente
View App.js
import React, { Component } from 'react';
import { Button, StyleSheet, View } from 'react-native';
import Quote from './js/components/Quote';
const data = [
{
text:
'Probleme kann man niemals mit derselben Denkweise lösen, durch die sie entstanden sind.',
author: 'Albert Einstein'
@behrends
behrends / Quote.js
Created Jul 4, 2018
11:30 - In js/components/
View Quote.js
import React, { Component } from 'react';
import { StyleSheet, Text, View } from 'react-native';
export default class Quote extends Component {
render() {
return <Text>Hallo!!!!!!!!!!!</Text>;
}
}
@behrends
behrends / App.js
Created Jul 4, 2018
11:00 - Drei Zitate
View App.js
import React, { Component } from 'react';
import { Button, StyleSheet, Text, View } from 'react-native';
const data = [
{
text:
'Probleme kann man niemals mit derselben Denkweise lösen, durch die sie entstanden sind.',
author: 'Albert Einstein'
},
{
@behrends
behrends / data.js
Created Jul 4, 2018
10:55 - Zitate
View data.js
const data = [
{
text:
'Probleme kann man niemals mit derselben Denkweise lösen, durch die sie entstanden sind.',
author: 'Albert Einstein'
},
{
text:
'Man braucht nichts im Leben zu fürchten, man muss nur alles verstehen.',
author: 'Marie Curie'
@behrends
behrends / App.js
Created Jul 4, 2018
10:05 - Aufbau Komponente
View App.js
// i.d.R. 3 Blöcke
// 1) imports
// ES 2015!
import React, { Component } from 'react';
// verwendete UI-Komponenten und APIs importieren
import { Button, StyleSheet, Text, View } from 'react-native';
// 2) Komponente
@behrends
behrends / Eingabe.java
Created Nov 29, 2017
Eingabe in Java mit Scanner
View Eingabe.java
import java.util.Scanner;
public class Eingabe {
public static void main(String[] args) {
int number = 8;
String text = "Text";
Scanner scanner = new Scanner(System.in);
// Eingabe
System.out.print("Zahl eingeben: ");
@behrends
behrends / gist:4072120
Created Nov 14, 2012
Getting a free SSL certificate
View gist:4072120

Getting a free certificate

This page guides you through the process of obtaining an HTTPS certificate for your site. This is a real certificate, not a self-signed certificate, and works in all major browsers.

The CA which we'll use is StartSSL. They provide basic certificates for free, although will charge for other types, such as wildcard certificates.

Generating a public/private keypair

A keypair can be generated with OpenSSL:

View tumblrGists.js
var gistPrefix = 'https://gist.github.com/',
// Cache document.write so that it can be restored once all Gists have been
// embedded.
cachedWrite = document.write,
body = $('body'),
// Map each p.gist to an object that contains the paragraph to be replaced
// and the Gist's identifier.
gists = $('a.gist').map(function(n, a) {
a = $(a);
var href = a.attr('href');
@behrends
behrends / private.xml
Created Jul 5, 2012
Easy access to Umlauts on MacOS X using KeyRemap4MacBook
View private.xml
<?xml version="1.0"?>
<root>
<item>
<name>Easy access for Umlauts</name>
<identifier>private.easy_umlaut_access</identifier>
<autogen>
--KeyToKey--
KeyCode::A, ModifierFlag::OPTION_L | ModifierFlag::SHIFT_L,
KeyCode::U, ModifierFlag::OPTION_L, KeyCode::A, ModifierFlag::SHIFT_L
</autogen>
View gist:1167716

Using http://github.com/carlhuda/janus so not all of these might be in standard vim

:e - edit file
0 - jump to beginning of line
$ - jump to end of line
^ - jump to first non-whitespace character of a line
e - jump to end of a word
E - jump to whitespace-delimited word
b (B) - jump to previous (whitespace-delimited) word
w (W) - jump to next (whitespace-delimited) word

You can’t perform that action at this time.