Skip to content

Instantly share code, notes, and snippets.

View clayote's full-sized avatar

clayote

View GitHub Profile
@clayote
clayote / clang_success
Last active April 9, 2020 21:16
Trying to build Zed Shaw's devpkg in my attempt to Learn C The Hard Way. The gcc build is failing but clang is working. Why?
~/src/c_hard/devpkg$ clang -I/usr/local/apr/include/apr-1 -L/usr/local/apr/lib -v -lapr-1 -laprutil-1 bstrlib.c commands.c db.c shell.c devpkg.c
clang version 3.8.0-2ubuntu3 (tags/RELEASE_380/final)
Target: x86_64-pc-linux-gnu
Thread model: posix
InstalledDir: /usr/bin
Found candidate GCC installation: /usr/bin/../lib/gcc/i686-linux-gnu/5.3.1
Found candidate GCC installation: /usr/bin/../lib/gcc/i686-linux-gnu/6.0.0
Found candidate GCC installation: /usr/bin/../lib/gcc/x86_64-linux-gnu/5.3.1
Found candidate GCC installation: /usr/bin/../lib/gcc/x86_64-linux-gnu/6.0.0
Found candidate GCC installation: /usr/lib/gcc/i686-linux-gnu/5.3.1
@clayote
clayote / logcat
Last active January 14, 2016 19:30
python-for-android new toolchain can't import the os module
I/ActivityManager( 805): Start proc org.nyct.pes for activity org.nyct.pes/org.kivy.android.PythonActivity: pid=22785 uid=10154 gids={50154, 9997, 1028, 1015} abi=armeabi
E/SELinux (22785): [DEBUG] get_category: variable seinfo: default sensitivity: NULL, cateogry: NULL
I/art (22785): Late-enabling -Xcheck:jni
D/ActivityThread(22770): Added TimaKeyStore provider
V/ActivityThread( 1476): updateVisibility : ActivityRecord{20af33a9 token=android.os.BinderProxy@21fc646 {com.sec.android.app.launcher/com.android.launcher2.Launcher}} show : true
D/tfa9895 ( 260): tfa9895_speakeron START
D/tfa9895 ( 260): [1127] tfa9895_speakeron: set mode 0, current mode 0
D/tfa9895 ( 260): Loaded container file speaker_on /system/etc/Tfa9895.cnt.
D/tfa9895 ( 260): tfa start with volume 6.
E/ ( 260): [NXP] tfaRunIsCold:0x001d
@clayote
clayote / deckbuilder_test.py
Last active December 22, 2015 19:29
Test for deck builder layout
# This is meant to be a deck builder for trading card games like Magic the Gathering.
# You drag cards from your collection on the right to your deck on the left.
# The order may be significant.
# A gap will open where your card will drop, if you release it.
# When you drop it, it will snap into place.
#
# Problem:
# If you drag a card from one stack to the front of the other, and then press Reset,
# the card goes back to its original position like it should, but it leaves behind
# a non-interactive afterimage.
@clayote
clayote / keybase.md
Created December 19, 2015 03:25
proving identity, new key

Keybase proof

I hereby claim:

  • I am logicaldash on github.
  • I am zacharyspector (https://keybase.io/zacharyspector) on keybase.
  • I have a public key whose fingerprint is 6479 5C6E 46B9 1816 1B5B C8EF 4992 3AB6 79C9 D795

To claim this, I am signing this object:

@clayote
clayote / droplisttest.py
Created December 14, 2015 20:15
I want this button to open up that ListView but it won't.
from kivy.app import App
from kivy.adapters.simplelistadapter import SimpleListAdapter
from kivy.lang import Builder
from kivy.properties import ObjectProperty
from kivy.uix.button import Button
from kivy.uix.dropdown import DropDown
class ListDropDown(DropDown):
adapter = ObjectProperty()
@clayote
clayote / uptouch.py
Created December 13, 2015 03:35
on_touch_up getting called twice due to grab
from kivy.properties import NumericProperty
from kivy.uix.widget import Widget
from kivy.logger import Logger
from kivy.app import App
class TouchUpListener(Widget):
n = NumericProperty(0)
def on_touch_down(self, touch):
@clayote
clayote / recyc_test.py
Created December 1, 2015 18:15
Trying to use a list comprehension for RecycleView data in kv.
from kivy.app import App
from kivy.lang import Builder
from kivy.properties import DictProperty, ListProperty, StringProperty
from kivy.uix.boxlayout import BoxLayout
class Viewclass(BoxLayout):
k = StringProperty()
v = StringProperty()
@clayote
clayote / trigger_decorator.py
Last active August 29, 2015 14:25
Trying to make a decorator to make triggers lazily
from kivy.event import EventDispatcher
from kivy.clock import Clock
from functools import partial
class trigger(object):
"""Make a trigger from a method outside of your class's __init__."""
def __init__(self, func):
self.func = func
@clayote
clayote / keybase.md
Created April 15, 2015 00:26
Identifying myself.

Keybase proof

I hereby claim:

  • I am logicaldash on github.
  • I am zacharyspector (https://keybase.io/zacharyspector) on keybase.
  • I have a public key whose fingerprint is 0B98 55A4 778B 5902 DC1A 109D B419 8D00 FD5F 9680

To claim this, I am signing this object:

@clayote
clayote / card.py
Created February 13, 2015 18:17
Abbreviated card.py
from kivy.adapters.listadapter import ListAdapter
from kivy.lang import Builder
from kivy.logger import Logger
from kivy.properties import (
BooleanProperty,
ListProperty,
NumericProperty,
ObjectProperty,
StringProperty
)