Skip to content

Instantly share code, notes, and snippets.

View gurkanakdeniz's full-sized avatar

Gürkan Akdeniz gurkanakdeniz

View GitHub Profile
@gurkanakdeniz
gurkanakdeniz / nautilus-copyfilepath-install.sh
Last active February 27, 2024 08:58
nautilus copyfile path fix x-special/nautilus-clipboard, using ctrl+shift+c
# !/bin/sh
nautilusconfigpath=~/.config/nautilus/
filename="scripts-accels"
shortcut="<Control><Shift>c copypath"
FILE=~/.config/nautilus/$filename
if [ -f "$FILE" ]; then
if grep -q "$shortcut" "$nautilusconfigpath$filename" ; then
echo "copypath shortcut found ignore shortcut write.."
else
python3 -m venv venv
source venv/bin/activate
pip install --upgrade pip
pip install -r requirements.txt
export FLASK_APP=app.py
@gurkanakdeniz
gurkanakdeniz / fq-keyboard-changer
Created July 6, 2019 02:12
f q keyboard changer
setxkbmap -layout tr -variant f
setxkbmap -layout tr
@gurkanakdeniz
gurkanakdeniz / firefox-left.css
Last active July 6, 2019 02:10
firefox left buttons
/* ~/.mozilla/firefox/<YOUR_FIREFOX_PROFILE>/chrome/userChrome.css */
@namespace url("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul");
.titlebar-min {
order: 2 !important;
}
.titlebar-max {
order: 3 !important;
}
@gurkanakdeniz
gurkanakdeniz / sample.html
Last active July 6, 2019 00:51
socket javascript listener
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" const="text/html;charset=UTF-8" />
<link href="http://fonts.googleapis.com/css?family=Comfortaa" rel="stylesheet" type="text/css">
<link rel="stylesheet" type="text/css" href="style.css" >
<script src="https://cdnjs.cloudflare.com/ajax/libs/socket.io/2.0.4/socket.io.js"></script>
<title>Socket Example</title>
</head>
@gurkanakdeniz
gurkanakdeniz / common.js
Created July 4, 2019 17:39
safe window location javascript
function currentPath() {
var response =
window.location.protocol +
"//" +
window.location.hostname +
(window.location.port ? ":" + window.location.port : "");
return response;
}
@gurkanakdeniz
gurkanakdeniz / CodeRunner.java
Created July 4, 2019 17:28
dynamic code call in java file
import java.io.File;
import java.lang.reflect.Method;
import java.net.URL;
import java.net.URLClassLoader;
public class CodeRunner {
public static void compile(String file) throws Exception {
try {
ProcessBuilder pb = new ProcessBuilder("javac", file);
@gurkanakdeniz
gurkanakdeniz / GitProperties.java
Last active July 4, 2019 17:32
eclipse jgit and git utility java and spring boot
import java.util.Optional;
import javax.annotation.PostConstruct;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.PropertySource;
@Configuration("application")
@PropertySource("application.properties")
@gurkanakdeniz
gurkanakdeniz / gitconf.sh
Created July 4, 2019 17:08
git configuration changer bash shell
#!/bin/sh
param=$1
config="gurkan"
name="defaultname"
mail="defaultmail"
BLUE='\033[0;34m'
ORANGE='\033[0;33m'
GREEN='\033[0;32m'
grep -rnw '/path/to/somewhere/' -e 'pattern'
-i stands for ignore case (optional in your case).
-r or -R is recursive,
-n is line number, and
-w stands for match the whole word.
-l (lower-case L) can be added to just give the file name of matching files.