Skip to content

Instantly share code, notes, and snippets.

#include <avr/io.h>
#define F_CPU 16000000UL
#include <util/delay.h>
int main (void)
{
DDRC = 0xff;
while(1)
{
PORTC ^= 0xff;
#include <avr/io.h>
#define F_CPU 16000000UL
#include <util/delay.h>
int main (void)
{
DDRC = 0xff;
while(1)
{
PORTC ^= 0xff;
@schuhumi
schuhumi / spotify sefault
Created February 22, 2015 16:28
2015-02-22
╭─simon at localhost in ~
╰─○ rm -R .config/spotify .cache/spotify; spotify
/usr/share/spotify/spotify-client/spotify: /usr/lib/libssl.so.1.0.0: no version information available (required by /usr/share/spotify/spotify-client/spotify)
/usr/share/spotify/spotify-client/spotify: /usr/lib/libcrypto.so.1.0.0: no version information available (required by /usr/share/spotify/spotify-client/spotify)
16:06:05.578 I [breakpad.cpp:107 ] Registered Breakpad for product: spotify
16:06:05.579 I [translate.cpp:139 ] Reloading language file
16:06:05.600 I [translate.cpp:139 ] Reloading language file
16:06:05.601 I [breakpad.cpp:261 ] Searching for crashdumps: /home/simon/.cache/spotify/*.dmp
@schuhumi
schuhumi / parallelman.py
Created March 30, 2015 16:32
parallelman script
#!/usr/bin/env python3
from subprocess import check_output
import os.path
import subprocess
import time
cachedir = "/var/cache/pacman/pkg" # NO "/" AT THE END!
print(check_output(["pacman", "-Sqy"]).decode("utf-8")) # update package data base
[root@localhost ~]# ./parallelman.py
:: Synchronizing package databases...
downloading core.db...
downloading extra.db...
downloading community.db...
downloading alarm.db...
aur is up to date
Building trees
...list of indipendend trees(14):
@schuhumi
schuhumi / gist:0f1f13c6e2f35af15990
Created May 16, 2015 18:34
launch java jar with nautilus, save as ~/.local/share/applications/run-jar.desktop
[Desktop Entry]
Encoding=UTF-8
Type=Application
Exec=java -jar %f
Icon=java
Name=run-jar
Name[zh_CN]=run-jar
Comment=Run the jar file
@schuhumi
schuhumi / viewlocalrefs.py
Created September 13, 2015 20:17
sort local refs of your ipfs by filetype
#!/usr/bin/env python3
import os
import subprocess
refsdir = "./localrefs"
extensions = { "ASCII text":"txt",
"C source":"c",
"C++ source":"cpp",
import sys
import gi
gi.require_version('Gtk', '3.0')
from gi.repository import Gtk
gi.require_version('GtkClutter', '1.0')
from gi.repository import GtkClutter, Clutter
GtkClutter.init(sys.argv)
class Application(Gtk.Application):
"modules": [
{
"name" : "beignet",
"buildsystem" : "cmake",
"make-install-args": [
"prefix=/app"
],
"config-opts": [
"-DCMAKE_INSTALL_PREFIX=/app"
],
@schuhumi
schuhumi / journalctl -k.txt
Created July 8, 2019 06:32
Kernel messages of broken Intel wifi with linux-firmware 20190628
Jul 08 07:49:32 yogal390 kernel: iwlwifi 0000:00:14.3: enabling device (0000 -> 0002)
Jul 08 07:49:32 yogal390 kernel: iwlwifi 0000:00:14.3: Found debug destination: EXTERNAL_DRAM
Jul 08 07:49:32 yogal390 kernel: iwlwifi 0000:00:14.3: Found debug configuration: 0
Jul 08 07:49:32 yogal390 kernel: iwlwifi 0000:00:14.3: loaded firmware version 46.a41adfe7.0 op_mode iwlmvm
Jul 08 07:49:32 yogal390 kernel: iwlwifi 0000:00:14.3: Detected Intel(R) Wireless-AC 9560 160MHz, REV=0x318
Jul 08 07:49:32 yogal390 kernel: iwlwifi 0000:00:14.3: Applying debug destination EXTERNAL_DRAM
Jul 08 07:49:32 yogal390 kernel: iwlwifi 0000:00:14.3: Allocated 0x00400000 bytes for firmware monitor.
Jul 08 07:49:32 yogal390 kernel: iwlwifi 0000:00:14.3: base HW address: 48:89:e7:cb:99:bd
Jul 08 07:49:32 yogal390 kernel: iwlwifi 0000:00:14.3 wlp0s20f3: renamed from wlan0
Jul 08 07:49:33 yogal390 kernel: iwlwifi 0000:00:14.3: Applying debug destination EXTERNAL_DRAM