Skip to content

Instantly share code, notes, and snippets.

{
"owner": {
"name": "Muhammet Kara",
"description": "Muhammet Kara is a great validator",
"type": [
"validator"
],
"identity": {
"ownership_disclosure_url": "",
"casper_association_kyc_url": "",
@mrkara
mrkara / allow-self-signed-cert-owncloud.md
Created July 13, 2020 14:44
[allow self signed certificates] for #ssl connection from #richdocuments on #owncloud

Put this in the try block of getDiscovery method in lib/Controller/DocumentController.php:

	$arrContextOptions=array(
						"ssl"=>array(
							"verify_peer"=>true,
							"allow_self_signed"=>true,
						),
					);
 $discovery = file_get_contents($wopiDiscovery, false, stream_context_create($arrContextOptions));
@mrkara
mrkara / LibreOffice-Dev-Bootcamp-Student-Notes.md
Last active December 23, 2019 14:06
#LibreOffice Developer Bootcamp - LibreOffice Geliştiriciliğine Giriş Kursu - İlk Yama için Öğrenci Notları
@mrkara
mrkara / clang-format-diff.md
Last active May 24, 2020 00:13
[clang-format-diff] #clang #styling #dev

Runs clang-format on the last commit (only the changed lines):

git diff -U0 --no-color HEAD^ | /usr/share/clang/clang-format-diff.py -i -p1

clang-format the files listed:

for f in `cat /home/kara/Belgeler/clang-sc.txt`; do /opt/lo/bin/clang-format -i ${f}; done;

@mrkara
mrkara / read-key-press-cpp-linux.cpp
Last active March 18, 2023 18:59
[Read Key Press from Terminal under Linux with C++] #cpp #snippet
#include<iostream>
int main() {
char c;
// Set the terminal to raw mode
while(1) {
system("stty raw");
c = getchar();
// terminate when "." is pressed
system("stty cooked");

Keybase proof

I hereby claim:

  • I am mrkara on github.
  • I am mkara (https://keybase.io/mkara) on keybase.
  • I have a public key ASAIC3RsoyN1UWU6IxG6XHoozt6umckhUwJwerRwN6JpLAo

To claim this, I am signing this object:

@mrkara
mrkara / GSoC_Final_Submission_reporrt-Revamp_the_Customization_Dialog.md
Last active August 29, 2017 15:42
GSoC Final Submission report  — Revamp the Customization Dialog

GSoC Final Submission report — Revamp the Customization Dialog

This year (2017 summer), I have participated the Google Summer of Code (GSoC) program with the project Revamp the Customization Dialog (of LibreOffice). And this is the work submission report required by Google as part of the final evaluations. I'll try to provide a short description of what work was done, and what's left to do.

Overview

The initial proposal was based on that the Tools > Customization dialog of LibreOffice was lacking on supporting means. For instance, it was not possible to search for a particular function. It also had an interface with focus on technical facts rather than the work-flow. With a redesign, the functionality would remain as it was, but updated so that average users would be able to customize their program. Initial mockup is here: https://user-prompt.com/how-to-make-libreoffice-customization-usable/

After the proposal was accepted as a GSoC project, it got attention from different parties (users, UX and UI d

@mrkara
mrkara / autogen.input
Last active November 21, 2020 10:29
autogen.input example for LibreOffice core source code repo
--enable-debug
--enable-dbgutil
--without-java
--without-help
# Use icecream
--enable-icecream
--with-parallelism=24
# Build DEB packages

Run icecc-scheduler at every reboot

@reboot sudo icecc-scheduler -d

Put system to sleep for 8 hours every day at 10pm

0 22 * * * sudo rtcwake -m mem -s 28800

=== Replace a String in Multiple Files in Linux Using Grep and Sed

#Basic Format

grep -rl matchstring somedir/ | xargs sed -i 's/string1/string2/g'