Skip to content

Instantly share code, notes, and snippets.

View zoozalp's full-sized avatar

Zekai Oğuz Özalp zoozalp

View GitHub Profile
Installing Arch:
sudo vim /etc/pacman.conf
Update packages list: sudo pacman -Syy
run sudo pacman -Syu before installing any software (to update the repositories first)
* Timing issue:
- Change hardware clock to use UTC time:
sudo timedatectl set-local-rtc 0
@zoozalp
zoozalp / sudo last command for fish
Created May 25, 2016 08:12
put the following code into ~/.config/fish/config.fish
function sudo
if test "$argv" = !!
eval command sudo $history[1]
else
command sudo $argv
end
end
@zoozalp
zoozalp / autoload-models.js
Created June 15, 2016 06:55
Auto-loading mongoose models in node.js
/**
* Create an index.js file in the same directory as your models. Add this code to it. Be sure to add the necessary fs require
*/
var fs = require('fs');
// initializes all models and sources them as .model-name
fs.readdirSync(__dirname).forEach(function(file) {
if (file !== 'index.js') {
var moduleName = file.split('.')[0];
@zoozalp
zoozalp / lorem-ipsum.txt
Created June 15, 2016 06:57
Lorem ipsum - dummy text
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
@zoozalp
zoozalp / .npmrc
Created June 15, 2016 07:01
smart npm
init-license=UNLICENSED
save=true
@zoozalp
zoozalp / .gitignore
Last active October 16, 2016 09:46
gitignore file for Intellij and Eclipse with Maven
### JetBrains template
# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio and Webstorm
# Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839
# User-specific stuff:
.idea/workspace.xml
.idea/tasks.xml
.idea/dictionaries
.idea/vcs.xml
.idea/jsLibraryMappings.xml
@zoozalp
zoozalp / update.sh
Created August 6, 2016 05:22
Update script for debian/ubuntu
#!/bin/bash
sudo apt-get update
sudo apt-get -y upgrade
sudo apt-get -y dist-upgrade
@zoozalp
zoozalp / .bash_profile
Created December 24, 2016 19:57
MacOS Terminal Colors
export PS1="\[$(tput bold)\]\u\[$(tput sgr0)\]@\[$(tput bold)\]\h\[$(tput sgr0)\]:\[$(tput bold)\]\w\[$(tput sgr0)\]\\$ \[$(tput sgr0)\]"
export CLICOLOR=1
export LSCOLORS=GxFxCxDxBxegedabagaced
@zoozalp
zoozalp / disable_swipe_navigation.sh
Last active January 16, 2017 20:50
Disable swiping in Chrome for OS X
defaults write com.google.Chrome AppleEnableMouseSwipeNavigateWithScrolls -bool false
defaults write com.google.Chrome AppleEnableSwipeNavigateWithScrolls -bool false
@zoozalp
zoozalp / update ubuntu bash script
Last active September 7, 2017 20:10
nano ~/.bashrc
update() {
sudo apt-get -y update
sudo apt-get -y upgrade
sudo apt-get -y dist-upgrade
sudo apt-get -y autoremove
}