Skip to content

Instantly share code, notes, and snippets.

View cengiz-io's full-sized avatar

Cengiz Can cengiz-io

View GitHub Profile
@cengiz-io
cengiz-io / sync-history.sh
Created October 24, 2023 10:10 — forked from jan-warchol/sync-history.sh
Synchronize history across bash sessions
# Synchronize history between bash sessions
#
# Make history from other terminals available to the current one. However,
# don't mix all histories together - make sure that *all* commands from the
# current session are on top of its history, so that pressing up arrow will
# give you most recent command from this session, not from any session.
#
# Since history is saved on each prompt, this additionally protects it from
# terminal crashes.
@cengiz-io
cengiz-io / 99-disable-wireless-when-wired
Last active October 9, 2023 16:36
Script should be placed under `/etc/NetworkManager/dispatcher.d/` with a name like `99-disable-wireless-when-wired`. Make sure 1) root owns it 2) it's mod is 755
#!/bin/sh
IFACE=$1
ACTION=$2
ntfy () {
sudo -u cengiz \
DISPLAY=:0 \
DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/1000/bus \
notify-send "$1" "$2"

Keybase proof

I hereby claim:

  • I am cengiz-io on github.
  • I am cengizio (https://keybase.io/cengizio) on keybase.
  • I have a public key ASAiT3S6NR3oXFJ1PaugneHvNAXlHiOga0ZtONyv2i95aQo

To claim this, I am signing this object:

@cengiz-io
cengiz-io / esbbs.pas
Created July 29, 2022 15:23 — forked from ssg/esbbs.pas
ES BBS Intro
{ ES BBS Intro - 1995 }
{ Binary can be get at http://www.pouet.net/prod.php?which=55705 }
{$M $800,0,655360}
{$N-,E-,F+}
uses Strings,XBuf,XMode;
const
static const struct display_timing tianma_tm050rdzg03_timing = {
.pixelclock = { 29500000, 30000000, 50000000 },
.hactive = { 800, 800, 800 },
.hfront_porch = { 1, 40, 255 },
.hback_porch = { 88, 88, 88 },
.hsync_len = { 1, 48, 255 },
.vactive = { 480, 480, 480 },
.vfront_porch = { 1, 13, 255 },
.vback_porch = { 32, 32, 32 },
.vsync_len = { 3, 3, 255 },
[92673.289532] usb 1-1.1.3: new high-speed USB device number 14 using xhci_hcd
[92673.380346] usb 1-1.1.3: New USB device found, idVendor=1357, idProduct=0503, bcdDevice= 9.13
[92673.380360] usb 1-1.1.3: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[92673.380366] usb 1-1.1.3: Product: P&E USB MULTILINK
[92673.380370] usb 1-1.1.3: Manufacturer: P&E Microcomputer Systems
[92673.380374] usb 1-1.1.3: SerialNumber: PEMC809D5
Bus 001 Device 015: ID 1357:0503 P&E Microcomputer Systems USB-ML-12 HCS08/HCS12 Multilink
package main
import (
"fmt"
"math/rand"
"sync"
"time"
)
var peopleGroup sync.WaitGroup
U-Boot SPL 2020.07-00001-g9620ba937c-dirty (Aug 16 2020 - 02:55:53 +0300)
>>SPL: board_init_r()
using memory lx-lx for malloc()
spl_init
Selecting config 'imx6-rakun'Trying to boot from USB SDP
g_dnl_register: g_dnl_driver.name = usb_dnl_sdp
g_dnl_bind: gadget: 0x915b64 cdev: 0x18308390
usb_add_config: adding config #1 'usb_dnload'/18308440
g_dnl_do_config: configuration: 0x18308440 composite dev: 0x18308390
sdp_add: cdev: 18308390 gadget: 915b64 gadget->ep0: 915bbc
@cengiz-io
cengiz-io / linux-clang-format
Last active July 23, 2020 11:16 — forked from qlyoung/linux-clang-format
Linux kernel style .clang-format
---
BasedOnStyle: LLVM
Language: Cpp
IndentWidth: 8
UseTab: Always
BreakBeforeBraces: Linux
AlwaysBreakBeforeMultilineStrings: true
AllowShortIfStatementsOnASingleLine: false
AllowShortLoopsOnASingleLine: false
AllowShortFunctionsOnASingleLine: false
#include <stdlib.h>
struct node {
int data;
struct node* next;
};
static void reverse(struct node** head_ref) {
struct node* tmp_prev = NULL;
struct node* current = *head_ref;