Skip to content

Instantly share code, notes, and snippets.

# Configuration file for Bumblebee. Values should **not** be put between quotes
## Server options. Any change made in this section will need a server restart
# to take effect.
[bumblebeed]
# The secondary Xorg server DISPLAY number
VirtualDisplay=:8
# Should the unused Xorg server be kept running? Set this to true if waiting
# for X to be ready is too long and don't need power management at all.
KeepUnusedXServer=false
[ 190.507639] wlp2s0: authenticate with 00:22:6b:48:5b:d4
[ 190.512929] wlp2s0: send auth to 00:22:6b:48:5b:d4 (try 1/3)
[ 190.515869] wlp2s0: authenticated
[ 190.516095] iwlwifi 0000:02:00.0 wlp2s0: disabling HT as WMM/QoS is not supported by the AP
[ 190.516104] iwlwifi 0000:02:00.0 wlp2s0: disabling VHT as WMM/QoS is not supported by the AP
[ 190.518989] wlp2s0: associate with 00:22:6b:48:5b:d4 (try 1/3)
[ 190.521495] wlp2s0: RX AssocResp from 00:22:6b:48:5b:d4 (capab=0x411 status=0 aid=4)
[ 190.528344] wlp2s0: associated
[ 190.528379] IPv6: ADDRCONF(NETDEV_CHANGE): wlp2s0: link becomes ready
[ 237.971270] loop: module loaded
@quinor
quinor / 16-combine for amps
Last active August 29, 2015 14:01
Gemcraft schemes to draw
━16
┣━5
┃ ┣━2
┃ ┃ ┣━ g
┃ ┃ ┗━ g
┃ ┗━3
┃ ┣━2
┃ ┃ ┣━ g
┃ ┃ ┗━ g
┃ ┗━ g
@quinor
quinor / 64-combine
Last active August 29, 2015 14:01
64-combine extreme method
━64
┣━44
┃ ┣━32
┃ ┃ ┣━24
┃ ┃ ┃ ┣━19
┃ ┃ ┃ ┃ ┣━15
┃ ┃ ┃ ┃ ┃ ┣━12
┃ ┃ ┃ ┃ ┃ ┃ ┣━10
┃ ┃ ┃ ┃ ┃ ┃ ┃ ┣━8
┃ ┃ ┃ ┃ ┃ ┃ ┃ ┃ ┣━6
@quinor
quinor / gem.py
Created May 28, 2014 21:08
gemcraft python base stuff
#!/usr/bin/env python3
class Gem:
c=0
def __init__(self, y=0, o=0, b=0, d=0, g=1, v=None, p=None):
self.number=Gem.c
Gem.c+=1
if v==None:
v=2**(g-1)
self.yellow, self.orange, self.black = y, o, b
@quinor
quinor / equations
Created May 29, 2014 22:11
64-spec for mana gems
0 = <g1 orange>
1 = <g1 black>
2 = 0+0
3 = 1+0
4 = 1+1
5 = 4+1
6 = 3+1
7 = 2+0
8 = 2+1
9 = 5+1
#include <SFML/Graphics.hpp>
#include <SFML/OpenGL.hpp>
#include <cstdio>
#include <vector>
#include <array>
#include <cstring>
using namespace sf;
using namespace std;
#!/usr/bin/env python3
import random
from statistics import *
def game (days, hitrate, moneypart):
money=1
for i in range(days):
if random.random()<hitrate:
money*=1+moneypart
[ 188.763] (++) Using config file: "/etc/bumblebee/xorg.conf.nvidia"
[ 188.821] (**) | |-->Device "DiscreteNvidia"
[ 188.821] (++) ModulePath set to "/usr/lib/nvidia/xorg/,/usr/lib/xorg/modules"
[ 194.882] (II) Loading /usr/lib/nvidia/xorg/modules/extensions/libglx.so
[ 196.661] (II) Module glx: vendor="NVIDIA Corporation"
[ 196.698] (II) NVIDIA GLX Module 340.24 Wed Jul 2 15:04:31 PDT 2014
[ 196.698] (II) LoadModule: "nvidia"
[ 196.699] (II) Loading /usr/lib/xorg/modules/drivers/nvidia_drv.so
[ 196.867] (II) Module nvidia: vendor="NVIDIA Corporation"
[ 196.891] (II) NVIDIA dlloader X Driver 340.24 Wed Jul 2 14:42:23 PDT 2014
class SessionToken (db.Model):
id = db.Column(db.Integer, primary_key=True)
token = db.Column(db.String(64), unique=True)
user = db.relationship("User", backref=db.backref("tokens", lazy="dynamic"))
user_id = db.Column(db.Integer, db.ForeignKey("user.id"))
expire_date = db.DateTime()
def __init__ (self, user, validity_time=DEFAULT_VALIDITY_TIME):
self.token=random_string()
self.user=user
self.expire_date=datetime.datetime.now()+validity_time