Skip to content

Instantly share code, notes, and snippets.

View cilice's full-sized avatar

Alexander Plavinski cilice

View GitHub Profile
[user]
name = Alexander Plavinski
email = alexander.plavinski@invision.de
signingkey = 67B439538C225419
[core]
editor = /usr/local/bin/vim
excludesfile = /Users/cilice/.gitignore
[pull]
rebase = true
[color]
@cilice
cilice / class.js
Last active November 5, 2018 16:49
class StuffComponent extends React.Component {
constructor(props) {
super(props);
this.state = { counter: 0 };
}
componentDidMount() {
this.timer = setInterval(() => {
this.setState((state) => ({ counter: state.counter + 1 }));
}, 1000);
import * as React from 'react';
import { Query } from 'react-apollo';
import { GET_MOVIES } from '../queries/GET_MOVIES'
import data from '../data';
import MovieTile from './MovieTile';
class MovieList extends React.Component {
state = { sort: 'POPULARITY' };
onSortChange = ({ target: { value } }) =>
Verifying that "cilice.id" is my Blockstack ID. https://onename.com/cilice

Keybase proof

I hereby claim:

  • I am cilice on github.
  • I am cilice (https://keybase.io/cilice) on keybase.
  • I have a public key whose fingerprint is B83B 0E4F 6326 AC17 5F77 5BD6 77ED 4BC9 B37F CF9A

To claim this, I am signing this object:

myUserService.getUser = function(){
if(typeof(this.user) != "undefined"){
return this.user;
} else {
var promise = $http.get('/users/me')
.success(function(results, status){
if( (status!= 200) || (typeof(results) == "undefined") ){
alert('logged out!');
location.href = "/index.html";
}
myUserService.getUser = function(){
var promise = $http.get('/users/me')
.success(function(results, status){
if( (status!= 200) || (typeof(results) == "undefined") ){
alert('logged out!');
location.href = "/index.html";
}
this.user = results;
});

Keybase proof

I hereby claim:

  • I am cilice on github.
  • I am cilice (https://keybase.io/cilice) on keybase.
  • I have a public key whose fingerprint is 394D FB60 30E4 E409 4DD3 65AC 1151 9280 9A2C 1DB6

To claim this, I am signing this object:

module.exports = function (grunt) {
'use strict';
// Project configuration.
grunt.initConfig({
pkg: require('./package'),
meta: {
banner: '/*! <%= pkg.name %> - v<%= pkg.version %> - ' +
'<%= grunt.template.today("yyyy-mm-dd") %> */'
@cilice
cilice / composer.md
Last active October 11, 2015 23:38
Composer and PHP

Composer and PHP

Around ten months ago, when I began working as a web developer here in Bremerhaven, I suddenly had to write a lot more PHP than I've used to. And it had to meet certain quality to make it durable so I faced a real problem: how do I write PHP properly?

require __DIR__.'/lib/something.php;'

I know, PHP has been around for years and all the OOP stuff it had was terrible, but things changed. Yes, it's still not really elegant, but it gets the things done. Even Marco Arment says that. But let's go back to the inelegant part: It finally starts to change.