Skip to content

Instantly share code, notes, and snippets.

View bluemyria's full-sized avatar
❤️
React

bluemyria bluemyria

❤️
React
  • blum.systems
  • Munich, Germany
View GitHub Profile
history -c
Performance : Optimization of slow pages (various tasks under EPIC "performance" and more)
1. QUERY performance
enabled Query Log (/admin/config/development/devel) - visit/identify pages with slow queries
EXPLAIN the queries - http://cyrve.com/explain
possible fixes
-> add Indexes
-> remove unecessary JOINs
-> minimise the item it has to sort
-> last resort - caching
@bluemyria
bluemyria / copyright.html
Last active September 29, 2015 11:39
Copyright
# for files only
find ./ -type f -exec chmod 644 {} +
# for directories only
find ./ -type d -exec chmod 755 {} +
@bluemyria
bluemyria / SpaceInvadersMicrobit.js
Created July 5, 2017 11:07
Space Invaders microbit
let Bullet: game.LedSprite = null
let Ship: game.LedSprite = null
let Invader: game.LedSprite = null
basic.forever(() => {
Invader = game.createSprite(Math.random(5), 0)
Invader.set(LedSpriteProperty.Brightness, 255)
for (let i = 0; i < 4; i++) {
Invader.change(LedSpriteProperty.Y, 1)
basic.pause(2000)
@bluemyria
bluemyria / PaddleBall.py
Last active August 3, 2017 15:11
Python Ball-Paddle Spiel
from tkinter import *
import random
import time
#für unseren Ball brauchen wir eine Klasse
class Ball:
def __init__(self, canvas, paddle, color):
#der Ball muss unser Canvas kennen
self.canvas = canvas
#Der Ball soll den Paddel auch kennen
@bluemyria
bluemyria / Snake.py
Last active September 18, 2022 04:53
Snake with Python and Tkinter
# Wichtige Variablen
PLAYGROUND_WIDTH=300
PLAYGROUND_HEIGHT=200
PLAYGROUND_COLOR='powder blue'
SNAKE_HEAD_COLOR='green'
SNAKE_BODY_COLOR='green'
SNAKE_MOVING_SPEED=10
# importiere module
try:
PLAYGROUND_WIDTH=300
PLAYGROUND_HEIGHT=200
PLAYGROUND_COLOR='white'
SNAKE_HEAD_COLOR='green'
SNAKE_BODY_COLOR='green'
SNAKE_MOVING_SPEED=10
try:
import Tkinter
except:
# Creating Ground
def creating_playground(self):
self.board=Tkinter.Canvas(self, width=PLAYGROUND_WIDTH, height=PLAYGROUND_HEIGHT, background=PLAYGROUND_COLOR)
self.board.pack(padx=10, pady=10)
return