Skip to content

Instantly share code, notes, and snippets.

View cilice's full-sized avatar

Alexander Plavinski cilice

  • 16:44 (UTC +01:00)
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
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;
});
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-php.md
Created October 23, 2012 09:19
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.

{
"bold_folder_labels": true,
"color_scheme": "Packages/Tomorrow Color Schemes/Tomorrow-Night.tmTheme",
"draw_white_space": "all",
"ensure_newline_at_eof_on_save": true,
"font_face": "Source Code Pro",
"font_options":
[
"subpixel_antialias"
],
@cilice
cilice / dabblet.css
Created January 18, 2012 09:25
The first commented line is your dabblet’s title
/**
* The first commented line is your dabblet’s title
*/
html {
background: #f06;
background: linear-gradient(45deg, #f06, yellow);
min-height:100%;
}