Skip to content

Instantly share code, notes, and snippets.

Avatar
😷

Akın Özgen akinozgen

😷
View GitHub Profile
View yancaman.js
#!/usr/bin/node
/**
* Copyright 2020 Akın Özgen <akinozgen17@outlook.com>
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to
* deal in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense,
* and/or sell copies of the Software, and to permit persons to whom
* the Software is furnished to do so, subject to the following conditions:
View _get
function _g() {
vars = {};
(window.location.href.split('?').length>1?window.location.href.split('?')[1]:'').split('&').forEach(_ => {
p=_.split('=');
vars[`${p[0]}`]=p[1].split(',').length>1?p[1].split(','):p[1];
});
return vars;
}
@akinozgen
akinozgen / dl-mp3.sh
Created Jun 26, 2020
Download any song by searching in dmenu.
View dl-mp3.sh
#!/bin/bash
directory="$(find -L ~ -type d -not -path '*/\.*' -not -path '*/Android/*' -maxdepth 5 | dmenu -i -l 10 -p 'Where do you want to save the file? Only absolute path...')"
query="$(echo '' | dmenu -i -p 'Search for Artist - Song name format')"
provider="$(echo -e 'Youtube\nSpotify' | dmenu -i -l 2 -p 'Select provider')"
cd $directory
if [ "$provider" = "Spotify" ]
then
@akinozgen
akinozgen / playit.sh
Created Jun 26, 2020
DeadBeef shorthand command palette with dmenu.
View playit.sh
#!/bin/bash
selected="$(find ~/Music/*/*.mp3 | dmenu -i -l 15 -fn 'SF Mono' -fn monospace-14)"
option="$(echo -e 'Play\nQueue' | dmenu -i -l 2 -fn 'SF Mono' -fn monospace-14)"
if [ "$option" = "Play" ]
then
deadbeef "$selected" &
elif [ "$option" = "Queue" ]
then
@akinozgen
akinozgen / spotdl-organizer.md
Last active Jun 23, 2020
Commands to organize downloaded mp3 files of spotdl (spotify downloader python package)
View spotdl-organizer.md

I don not recommending using it as bash script.

Commands:

  1. Store artist names to multi line text variable.

export list="$(ls *.mp3 | awk '{split($0,a," - "); print a[1]}' | uniq)"

@akinozgen
akinozgen / sars-cov-2.dat
Last active Apr 7, 2020
sars-cov2-genom (JSON file @ bottom)
View sars-cov-2.dat
a: white
g: black
t: blue
c: red
-------------------------------------------------------------------
1 attaaaggtt tataccttcc caggtaacaa accaaccaac tttcgatctc ttgtagatct
61 gttctctaaa cgaactttaa aatctgtgtg gctgtcactc ggctgcatgc ttagtgcact
121 cacgcagtat aattaataac taattactgt cgttgacagg acacgagtaa ctcgtctatc
181 ttctgcaggc tgcttacggt ttcgtccgtg ttgcagccga tcatcagcac atctaggttt
@akinozgen
akinozgen / currently_playing.bash
Last active Jan 27, 2020
get title and artist from playerctl an join
View currently_playing.bash
#!/usr/bin/env bash
echo "$(playerctl -p spotify metadata | grep xesam: | awk '{ if ($2 == "xesam:title") { print $3; } }') by $(playerctl -p spotify metadata | grep xesam: | awk '{ if ($2 == "xesam:artist") { print $3; } }')"
View conky-profile.sh
#!/bin/bash
conky -q -c $HOME/.config/conky/conky-grey.conf
conky -q -c $HOME/.config/conky/conky.conf
# read
View jamaljs blog first step.js
// Örnek 1. Standart statik içerik
Jml.initialize({
customTags: ['theme', 'example', 'akinozgen', 'profile-image', 'user-avatar'],
autoId: true,
originalNames: true
});
const context = div(
{ class: 'form-group' },
input({ type: 'text', class: 'form-control', name: 'username' })
View jamaljs blog overloads.js
jTable(): HTMLElement;
jTable(children: string|HTMLElement): HTMLElement;
jTable(children: Array<string|HTMLElement>): HTMLElement;
jTable(attributes: Object<string, string|number|function>, children: string|HTMLElement): HTMLElement;
jTable(attributes: Object<string, string|number|function>, children: Array<string|HTMLElement>): HTMLElement;
You can’t perform that action at this time.