Skip to content

Instantly share code, notes, and snippets.

View proofek's full-sized avatar

Sebastian Marek proofek

  • Sheffield, United Kingdom
View GitHub Profile
@proofek
proofek / led.go
Created February 28, 2021 13:38
golang led example
package main
import (
"fmt"
"github.com/stianeikeland/go-rpio"
"os"
"time"
)
func main() {

Keybase proof

I hereby claim:

  • I am proofek on github.
  • I am proofek (https://keybase.io/proofek) on keybase.
  • I have a public key whose fingerprint is 7F16 64F3 208D 4245 BC92 005B E3D7 32C2 42F5 51A3

To claim this, I am signing this object:

@proofek
proofek / clean.php
Created December 4, 2013 20:37
Configure HTML Purifier Settings in SugarCRM (src/include/clean.php)
<?php
class SugarCleaner
{
(...)
function __construct()
{
global $sugar_config;
@proofek
proofek / sugarapi.php
Created July 25, 2013 16:06
Arguments passed to SugarCRM API when asked to fetch relationship details
<?php
$args = array(
'module' => 'Accounts',
'id' => '37a5710e-665f-43a5-5108-51f10f6c7daf',
'fields' => array('id', 'name'),
'link_name_to_fields' => array(
array(
'name' => 'related_user_link',
'value' => array("id", "name", "phone_work")
@proofek
proofek / vardefs-relationship.php
Created July 25, 2013 16:02
relationship definition for a relate field created using proper relationship
<?php
'accounts_related_user' => array(
'lhs_module' => 'Users',
'lhs_table' => 'users',
'lhs_key' => 'id',
'rhs_module' => 'Accounts',
'rhs_table' => 'accounts',
'rhs_key' => 'related_user_id',
'relationship_type' => 'one-to-many',
@proofek
proofek / vardefs-fields.php
Created July 25, 2013 15:56
Fields definitions for a relate field implemented using 1-2-many relationship
<?php
'releted_user_id' => array(
'name' => 'releted_user_id',
'rname' => 'user_name',
'id_name' => 'releted_user_id',
'vname' => 'LBL_USER_ID',
'type' => 'relate',
'table' => 'users',
'module' => 'Users',
@proofek
proofek / vardefs.php
Created July 25, 2013 14:06
Related field as created by Studio
<?php
'related_user_c' => array (
'dependency' => '',
'required' => false,
'source' => 'non-db',
'name' => 'related_user_c',
'vname' => 'LBL_RELATED_USER',
'type' => 'relate',
'massupdate' => '0',
@proofek
proofek / Demo_Suppliers_subpanel_demo_suppliercontactdetails.php
Last active December 18, 2015 16:29
Supplier Contact Details subpanel definition
<?php
<?php
// created: 2013-06-19 07:45:46
$subpanel_layout['list_fields'] = array (
'demo_suppliers_name' =>
array (
'type' => 'relate',
'link' => true,
'vname' => 'LBL_SUPPLIER_NAME',
<?php
$layout_defs['Demo_Suppliers']['subpanel_setup']['demo_suppliercontactdetails'] = array(
'order' => 130,
'module' => 'Demo_SupplierContactDetails',
'get_subpanel_data' => 'demo_suppliercontactdetails',
'sort_order' => 'asc',
'sort_by' => 'name',
'subpanel_name' => 'Demo_Suppliers_subpanel_demo_suppliercontactdetails',
'title_key' => 'LBL_DEMO_SUPPLIERCONTACTDETAILS_SUBPANEL_TITLE',
@proofek
proofek / sugar.sql
Created June 18, 2013 22:29
SQL to alter demo_suppliercontactdetails and create the relationship
/* Table : demo_suppliercontactdetails */
/*COLUMNS*/
/*MISSING IN DATABASE - demo_suppliers_id - ROW*/
/* INDEXES */
ALTER TABLE demo_suppliercontactdetails add COLUMN demo_suppliers_id char(36) NULL ;