Skip to content

Instantly share code, notes, and snippets.

@alcroito
alcroito / build_with_qmake.cmake
Created October 3, 2020 17:05
Installing Qt via Online installer, building and deploying a qmake app project with Github Actions
set(CMAKE_EXECUTE_PROCESS_COMMAND_ECHO STDOUT)
if(CMAKE_HOST_WIN32)
set(qt_target_dir "msvc2019_64")
elseif(CMAKE_HOST_APPLE)
set(qt_target_dir "clang_64")
else()
set(qt_target_dir "gcc_64")
endif()
libdispatch.dylib`_dispatch_kq_init:
-> 0x7fffc2cbcabe <+0>: pushq %rbp
0x7fffc2cbcabf <+1>: movq %rsp, %rbp
0x7fffc2cbcac2 <+4>: pushq %rbx
0x7fffc2cbcac3 <+5>: subq $0x18, %rsp
0x7fffc2cbcac7 <+9>: leaq 0x8f1edaa(%rip), %rbx ; _dispatch_unsafe_fork
0x7fffc2cbcace <+16>: testb $0x1, (%rbx)
0x7fffc2cbcad1 <+19>: jne 0x7fffc2cbcad8 ; <+26>
0x7fffc2cbcad3 <+21>: callq 0x7fffc2ccbe00 ; _dispatch_fork_becomes_unsafe_slow
0x7fffc2cbcad8 <+26>: callq 0x7fffc2ccde16 ; _dispatch_kevent_workqueue_init
@alcroito
alcroito / qt57_webengine_xcode_511_osx_sdk_10_10_on_el_capitan.md
Created June 21, 2016 12:19
Qt 5.7 WebEngine with XCode 5.1.1 on OSX 10.9 (Mavericks) and OSX 10.11 (El Capitan)

Qt 5.7 WebEngine on OSX 10.9 with XCode 5.1.1

To succesfully build Qt 5.7 WebEngine on OSX 10.9 with XCode 5.1.1, the following items are required:

  • XCode 5.1.1 for the toolchain
  • XCode 6.3 for the OSX 10.10.3 SDK

XCode 6.2 which is the last supported version to run on OSX 10.9 does not contain the latest 10.10 SDK (which is 10.10.3, which introduced Force Touch APIs in a patch release, used by Chromium starting with version 49....).

Then do the following steps:

@alcroito
alcroito / ajax_caching.php
Created February 9, 2015 11:27
Drupal Ajax Response caching
/**
* Implements hook_menu().
*/
function custom_module_menu() {
$items = array();
$items['custom-module-ajax'] = array(
'page callback' => 'custom_module_data_ajax',
'access arguments' => array('access content'),
@alcroito
alcroito / theme_field_overrides.php
Created February 9, 2015 08:58
Drupal theme_field overrides
function custom_preprocess_field(&$variables, $hook) {
$element = $variables['element'];
// Add suggestions for entity view mode as well.
if (isset($element['#view_mode'])) {
$view_mode = $element['#view_mode'];
$variables['theme_hook_suggestions'][] = 'field__' . $element['#field_name'] . '__' . $element['#bundle'] . '__' . $view_mode;
}
}
tree.tpl
<apply template="home">
<h2>Friendly hierarchical tree</h2>
<ul class="list-group">
<tree />
</ul>
</apply>
tree_node.tpl