Skip to content

Instantly share code, notes, and snippets.

View mertyildiran's full-sized avatar
:octocat:
Doing some octopus work

M. Mert Yildiran mertyildiran

:octocat:
Doing some octopus work
View GitHub Profile
@mertyildiran
mertyildiran / alphademo-png.c
Created July 2, 2017 14:29
Transparent window with GTK and display a PNG image
#include <gtk/gtk.h>
#include <gdk/gdkscreen.h>
#include <cairo.h>
/*
* This program shows you how to create semi-transparent windows,
* without any of the historical screenshot hacks. It requires
* a modern system, with a compositing manager. I use xcompmgr
* and the nvidia drivers with RenderAccel, and it works well.
*
@mertyildiran
mertyildiran / google_speech_api.py
Created March 14, 2016 16:41
Google Speech API example
#!/usr/bin/env python3
# pip install SpeechRecognition
# https://pypi.python.org/pypi/SpeechRecognition/
# recognizer_instance.recognize_google(audio_data, key = None, language = "en-US", show_all = False)
# Performs speech recognition on audio_data (an AudioData instance), using the Google Speech Recognition API.
# The Google Speech Recognition API key is specified by key. If not specified, it uses a generic key that works out of the box.
# This should generally be used for personal or testing purposes only, as it may be revoked by Google at any time.
@mertyildiran
mertyildiran / example.js
Last active March 24, 2023 01:36
JavaScript code with issues
var kflPcapS3Data = null;
wrapper.kflPcapS32 = function (data, params) {
function kflPcapS3detect(data) {
if (kflPcapS3Data === null)
return;
kflPcapS3Data.kflArr.forEach(function (kflQuery, idx) {
if (kfl.match(kflQuery, data)) {
kflPcapS3Data.pcapInfoArr[idx].pcapArr.push(data.stream);
@mertyildiran
mertyildiran / alphademo-gdk-pixbuf.c
Last active March 20, 2023 06:47
Display an animated GIF using GdkPixbufAnimation in a transparent window (GTK+)
#include <gtk/gtk.h>
#include <gdk/gdkscreen.h>
#include <cairo.h>
#include <gdk-pixbuf/gdk-pixbuf.h>
#include <stdlib.h>
/*
* This program shows you how to create semi-transparent windows,
* without any of the historical screenshot hacks. It requires
* a modern system, with a compositing manager. I use xcompmgr
@mertyildiran
mertyildiran / alphademo.c
Created July 2, 2017 13:10
Transparent window with GTK
#include <gtk/gtk.h>
#include <gdk/gdkscreen.h>
#include <cairo.h>
/*
* This program shows you how to create semi-transparent windows,
* without any of the historical screenshot hacks. It requires
* a modern system, with a compositing manager. I use xcompmgr
* and the nvidia drivers with RenderAccel, and it works well.
*
@mertyildiran
mertyildiran / out.txt
Created February 3, 2023 23:56
Kubeshark segmentation violation
fatal error: unexpected signal during runtime execution
[signal SIGSEGV: segmentation violation code=0x1 addr=0x63 pc=0x7f124447b5ca]
runtime stack:
runtime.throw({0x1b8c38e, 0x7f11d8000d53})
/usr/local/go/src/runtime/panic.go:1198 +0x71
runtime.sigpanic()
/usr/local/go/src/runtime/signal_unix.go:719 +0x396
goroutine 659 [syscall]:
@mertyildiran
mertyildiran / Dockerfile
Created December 28, 2022 14:14
Nginx with runtime-env-cra
FROM nginx:1.22.0-alpine
RUN rm -rf /etc/nginx/conf.d
RUN apk add --update nodejs
RUN apk add --update npm
RUN npm install -g runtime-env-cra@0.2.4
@mertyildiran
mertyildiran / determinant.c
Created December 20, 2013 12:58
nxn'lik bir matrisin determinantını hesaplayan program
// nxn'lik bir matrisin determinantını hesaplayan program
// Mehmet Mert Yıldıran 12060367
// Ubuntu terminal altında çalıştırma:
// gcc determinant.c -o determinant -lm
// ./determinant
#include<stdio.h>
#include<math.h>
#define MAX 10
@mertyildiran
mertyildiran / Makefile
Created June 29, 2017 13:28
transregion: X11 SHAPE extension input region demo
# Makefile for transregion
CFLAGS = -g
LDFLAGS = -L/usr/X11R6/lib -lXpm -lXext -lX11 -lm
all: transregion
transregion: transregion.o
$(CC) -o transregion transregion.o $(LDFLAGS)
@mertyildiran
mertyildiran / init.toml
Last active September 30, 2022 12:46
SpaceVim settings ~/.SpaceVim.d/init.toml
#=============================================================================
# dark_powered.toml --- dark powered configuration example for SpaceVim
# Copyright (c) 2016-2017 Wang Shidong & Contributors
# Author: Wang Shidong < wsdjeg at 163.com >
# URL: https://spacevim.org
# License: GPLv3
#=============================================================================
# All SpaceVim option below [option] section
[options]