Skip to content

Instantly share code, notes, and snippets.

View seyyah's full-sized avatar

seyyah seyyah

  • Researcher
  • Turkey
View GitHub Profile
@seyyah
seyyah / fail2ban_notifier.rb
Created March 3, 2019 15:26 — forked from etdsoft/fail2ban_notifier.rb
Simple Fail2banNotifier for exception_notification (will submit a pull request and update gist when accepted). See: http://securityroots.com/blog/2014/01/protecting-app-rails-fail2ban/
class Fail2banNotifier
def initialize(options)
@default_options = options
@default_options[:logfile] ||= Rails.root.join('log', 'fail2ban.log')
# Roll over every 30M, keep 10 files
@logger ||= Logger.new(@default_options[:logfile], 10, 30*1024*1024)
end
def call(exception, options={})
@seyyah
seyyah / gist:6a6408e54592aba04a27b71972e8a52b
Created February 1, 2019 07:16 — forked from CristinaSolana/gist:1885435
Keeping a fork up to date

1. Clone your fork:

git clone git@github.com:YOUR-USERNAME/YOUR-FORKED-REPO.git

2. Add remote from original repository in your forked repository:

cd into/cloned/fork-repo
git remote add upstream git://github.com/ORIGINAL-DEV-USERNAME/REPO-YOU-FORKED-FROM.git
git fetch upstream
@seyyah
seyyah / nginx.conf
Created January 31, 2019 19:25 — forked from edib/nginx.conf
moodle subdirectory inside a wordpress installation
server {
listen 80 default_server;
listen [::]:80 default_server;
root /var/www/wordpress;
index index.php index.html index.htm index.nginx-debian.html;
server_name _;
@seyyah
seyyah / stm32_hal_uart_receive_it_example.c
Created January 4, 2019 14:21 — forked from monpetit/stm32_hal_uart_receive_it_example.c
STM32 HAL Driver Receive with Interrupt example
#include "stm32f1xx_hal.h"
UART_HandleTypeDef UartHandle; /* UART 핸들러 */
__IO ITStatus UartReady = RESET; /* UART 상태 지시자 */
#define RXBUFFERSIZE 10
uint8_t aRxBuffer[RXBUFFERSIZE]; /* UART 수신 버퍼 */
int main(void)
@seyyah
seyyah / lv_conf.h
Created December 20, 2018 08:44
DMA + LV_MEM_CUSTOM Problem
/**
* @file lv_conf.h
*
*/
#ifndef LV_CONF_H
#define LV_CONF_H
/*===================
Dynamic memory
*===================*/
@seyyah
seyyah / bug.log
Created December 17, 2018 12:31
STM32CubeMX 5.0 Bug
strace: [ Process PID=27942 runs in 32 bit mode. ]
strace: Process 27943 attached
strace: Process 27944 attached
strace: [ Process PID=27944 runs in 64 bit mode. ]
[pid 27944] stat("/home/seyyah", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
[pid 27944] stat(".", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
strace: Process 27945 attached
[pid 27945] stat("/usr/lib/jvm/java-8-oracle/bin/../lib/amd64/jli/tls/haswell/x86_64", 0x7ffc6a28e060) = -1 ENOENT (No such file or directory)
[pid 27945] stat("/usr/lib/jvm/java-8-oracle/bin/../lib/amd64/jli/tls/haswell", 0x7ffc6a28e060) = -1 ENOENT (No such file or directory)
[pid 27945] stat("/usr/lib/jvm/java-8-oracle/bin/../lib/amd64/jli/tls/x86_64", 0x7ffc6a28e060) = -1 ENOENT (No such file or directory)
[
{ "keys": ["ctrl+shift+r"], "command": "toggle_comment", "args": { "block": false } },
{ "keys": ["ctrl+shift+t"], "command": "toggle_comment", "args": { "block": true } },
{ "keys": ["ctrl+shift+8"], "command": "fold" },
{ "keys": ["ctrl+shift+9"], "command": "unfold" },
]
@seyyah
seyyah / i18n.md
Created November 22, 2018 10:05
LittlevGL i18n Suggesstion
@seyyah
seyyah / lvgl.html
Created November 21, 2018 18:04
LVGL Doc via gwtc
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Documentation </title>
<style>/*!
* Bootstrap v3.3.7 (http://getbootstrap.com)
* Copyright 2011-2016 Twitter, Inc.