Skip to content

Instantly share code, notes, and snippets.

@czak
czak / webos
Last active March 1, 2024 22:33
Meson cross file for webos
[constants]
arch = 'arm-webos-linux-gnueabi'
toolchain = '/home/czak/projects/webos/webos-sdk-x86_64/1.0.g'
sysroot = toolchain / 'sysroots/armv7a-neon-webos-linux-gnueabi'
[host_machine]
system = 'webos-linux'
cpu_family = 'arm'
cpu = 'armv7a'
endian = 'little'
@czak
czak / glarea.c
Created January 12, 2022 14:27
Testing GtkGLArea framerate in GTK3/GTK4
// GTK3 variant: │drwxr-xr-x 2 czak czak 4096 Jan 12 15:24 .
// gcc -DGTK3 $(pkg-config --cflags gtk+-3.0) -o glarea-gtk3 glarea.c $(pkg-config --libs gtk+-3.0) │drwxr-xr-x 18 czak czak 4096 Jan 12 11:15 ..
// │-rw-r--r-- 1 czak czak 24 Jan 12 13:24 .gitignore
// GTK4 variant: │-rw-r--r-- 1 czak czak 1012 Jan 12 13:33 .vimlocal
// gcc -DGTK4 $(pkg-config --cflags gtk4) -o glarea-gtk4 glarea.c $(pkg-config --libs gtk4) │-rw-r--r-- 1 czak czak 551 Jan 12 15:00 Makefile
0: 83 ec 28 sub esp, 40
3: e8 00 00 00 00 call 0x8 <_start+0x8>
8: 58 pop eax
9: 81 c0 7c 00 00 00 add eax, 124
f: c7 44 24 0c 00 00 00 00 mov dword ptr [esp + 12], 0
17: c7 44 24 09 00 00 00 00 mov dword ptr [esp + 9], 0
1f: c7 44 24 05 00 00 00 00 mov dword ptr [esp + 5], 0
27: 8a 88 fe ff ff ff mov cl, byte ptr [eax - 2]
2d: 88 4c 24 04 mov byte ptr [esp + 4], cl
31: 8b 80 fa ff ff ff mov eax, dword ptr [eax - 6]
@czak
czak / With JLinkScript
Created March 6, 2020 11:09
Tinker Board (RK3288) & J-Link connection attempts
$ ./JLinkExe -JLinkScriptFile rk3288-timmy.JLinkScript
SEGGER J-Link Commander V6.62d (Compiled Mar 2 2020 09:23:45)
DLL version V6.62d, compiled Mar 2 2020 09:23:31
Connecting to J-Link via USB...O.K.
Firmware: J-Link V11 compiled Jan 7 2020 16:52:13
Hardware version: V11.00
S/N: 261002253
License(s): FlashBP, GDB
OEM: SEGGER-EDU
@czak
czak / plasma.gif
Last active February 7, 2017 17:41
GIFy w Golangu
plasma.gif
@czak
czak / base_boxed_basic_query.html
Created August 23, 2016 18:24
Mailchimp's base_boxed_basic_query.html template pre- & post-CSS-inlining
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>*|MC:SUBJECT|*</title>
<style type="text/css">
/* /\/\/\/\/\/\/\/\/ CLIENT-SPECIFIC STYLES /\/\/\/\/\/\/\/\/ */
#outlook a{padding:0;} /* Force Outlook to provide a "view in browser" message */
.ReadMsgBody{width:100%;} .ExternalClass{width:100%;} /* Force Hotmail to display emails at full width */
.ExternalClass, .ExternalClass p, .ExternalClass span, .ExternalClass font, .ExternalClass td, .ExternalClass div {line-height: 100%;} /* Force Hotmail to display normal line spacing */
@czak
czak / AndroidManifest.xml
Last active April 25, 2023 17:42
Complete source of a simple VerticalGridFragment example
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="pl.czak.tvtalk.leanbackminimal">
<uses-feature
android:name="android.software.leanback"
android:required="true"/>
<application
android:allowBackup="true"
@czak
czak / highlight_caption_block.rb
Created June 22, 2016 18:03
Extended jekyll {% highlight %} tag with <figcaption>
module Czak
module Tags
class HighlightCaptionBlock < Liquid::Block
include Liquid::StandardFilters
# The regular expression syntax checker. Start with the language specifier.
# Follow that by zero or more space separated options that take one of three
# forms: name, name=value, or name="<quoted list>"
#
# <quoted list> is a space-separated list of numbers
Pod::Spec.new do |s|
s.name = "AESCrypt"
s.version = "0.0.1"
s.summary = "Simple AES encryption / decryption for iOS and OS X."
s.homepage = "https://github.com/Gurpartap/AESCrypt-ObjC"
s.license = 'MIT'
s.author = { "Gurpartap Singh" => "contact@gurpartap.com" }
s.source = { :git => "https://github.com/Gurpartap/AESCrypt-ObjC.git", :commit => "6fa7a4f95d3cb5ada117e8a96b7a9eacaf0457ae" }
s.source_files = '*.{h,m}'
end
@czak
czak / line_number_appended_to_path.feature
Created March 14, 2011 22:32
Failing scenario when an outer-level example is placed after a nested example group
Feature: line number appended to file path
To run a single example or group, you can append the line number to the path, e.g.
rspec path/to/example_spec.rb:37
Background:
Given a file named "example_spec.rb" with:
"""
describe "outer group" do