Skip to content

Instantly share code, notes, and snippets.

View mijimoco's full-sized avatar

Serhan 德睿 mijimoco

View GitHub Profile
@mijimoco
mijimoco / .gitignore
Created September 27, 2018 07:27 — forked from billerickson/.gitignore
Wordpress .gitignore for Siteground by Bill Erickson
# Ignore everything #
**
!wp-content/
wp-content/**
!wp-content/themes/
!wp-content/plugins/
wp-content/themes/**
wp-content/plugins/**
# Add two rules for each Theme or Plugin you want to include:
@mijimoco
mijimoco / mysql OSX start stop restart
Created January 5, 2018 02:17
MySQL start/stop/restart commands from CLI OSX
# Start
sudo /usr/local/mysql/support-files/mysql.server start
# Stop
sudo /usr/local/mysql/support-files/mysql.server stop
# Restart
sudo /usr/local/mysql/support-files/mysql.server restart
@mijimoco
mijimoco / file directory size in linux
Created February 23, 2017 06:14
file directory sizes in linux
du -sh directory_name /* Gives you the size of the directory*/
ls -l filename /* Size of the file*/
ls -l * /* Size of All the files in the current directory */
ls -al * /* Size of All the files including hidden files in the current directory */
ls -al dir/ /* Size of All the files including hidden files in the 'dir' directory */
/*Including -h option (for Ex: ls -lh * or du -sh) will give you size in human readable format (Kb, MB etc..) */
@mijimoco
mijimoco / caesars-cipher.markdown
Created February 4, 2017 08:40
Caesars Cipher
@mijimoco
mijimoco / falsy-bouncer.markdown
Created January 30, 2017 06:46
Falsy Bouncer
@mijimoco
mijimoco / script.js
Created January 18, 2017 22:45
Truncate a string
function truncateString(str, num) {
// Clear out that junk in your trunk
var trunStr = "";
if (str.length>num){ //first checking wheter given string needs to truncated
if (num>3) { // check whether given num is bigger than 3 or not
trunStr = str.slice(0, num-3); //we need to take additional 3 from the ...
console.log(trunStr);
@mijimoco
mijimoco / repeat-a-string-repeat-a-string.markdown
Created January 17, 2017 12:34
Repeat a string repeat a string
@mijimoco
mijimoco / confirm-the-ending.markdown
Created January 17, 2017 12:03
Confirm the Ending
@mijimoco
mijimoco / return-largetst-numbers-in-array.markdown
Created January 14, 2017 05:58
Return Largetst Numbers in Array
@mijimoco
mijimoco / find-the-longest-word-in-an-array.markdown
Created January 11, 2017 10:39
Find the Longest Word in an Array