Skip to content

Instantly share code, notes, and snippets.

View firatoezcan's full-sized avatar

Firat Özcan firatoezcan

View GitHub Profile
@firatoezcan
firatoezcan / .bashrc
Created March 8, 2021 09:48
Infinite bash history
unset HISTFILESIZE
export HISTSIZE=10000
export HISTFILESIZE=10000
export HISTCONTROL=ignoredups:erasedups
export PROMPT_COMMAND="${PROMPT_COMMAND:+$PROMPT_COMMAND$'\n'}history -a; history -c; history -r"
shopt -s histappend
@firatoezcan
firatoezcan / NewCode.js
Created November 16, 2018 20:58
The current code of the dynamic navigation generation
document.addEventListener("DOMContentLoaded", function () {
var content = getCorrectContent()
var navigation = getCorrectNavigation()
var cssRules = [ /* Array containing strings corresponding to CSS rules */ ]
init()
function init() {
addNavigation()
addNavigationEvents()
addCSSRules(cssRules.join(""))
@firatoezcan
firatoezcan / OldCode.js
Created November 16, 2018 20:14
The previous code of the dynamic navigation generation
function screenClass() {
if ($(window).innerWidth() < 725) {
// getting the data from the navigation
var subNav = '<div id="subNavigation">' + navData + '</div>';
if (!$('#subnavigation').length) {
$('#content').prepend(subNav);
$('#content').css("padding-left", "0px");
$('.col-left ul:first').clone().appendTo('#subnavigation');
$('#subnavigation').click(function () {
$('#subnavigation i').toggleClass('fa-chevron-down fa-chevron-up');