Skip to content

Instantly share code, notes, and snippets.

View gatici's full-sized avatar
🎯
Focusing

Gulsum Atici gatici

🎯
Focusing
View GitHub Profile
@whelmed
whelmed / lamp_demo_final.yaml
Created November 7, 2016 19:08
The final result of our LAMP demo
---
- hosts: all
gather_facts: false
connection: local
become: yes
vars:
packages:
- apache2
- mysql-server
@somandubey
somandubey / gist:52bff8c7cc8639292629
Created August 28, 2014 19:56
How to increase ulimit in Linux

How to increase ulimit in Linux:

  • Step 1 (ulimit): open the sysctl.conf and add this line fs.file-max = 65536

      vi /etc/sysctl.conf   
    

    add following at end of file in above file:

      fs.file-max = 65536
    

save and exit.

@vrillusions
vrillusions / config
Created March 13, 2014 22:47
Example of a `~/.ssh/config` file which makes it easier to login to different servers
# ssh(1) obtains configuration data from the following sources in the following order:
#
# 1. command-line options
# 2. user's configuration file (~/.ssh/config)
# 3. system-wide configuration file (/etc/ssh/ssh_config)
#
# For each parameter, the first obtained value will be used. The configuration files contain sections separated
# by “Host” specifications, and that section is only applied for hosts that match one of the patterns given in the
# specification. The matched host name is the one given on the command line.
#
@qmmr
qmmr / bash.md
Last active September 22, 2018 13:40
UNIX - useful terminal commands

read content of file.txt and replace all text with text2 and put it into file2.txt

cat file.txt | sed s/text/text2/ > file2.txt

scp /path/to/local/file username@hostname:/path/to/copy/to/

scp username@hostname:/path/to/remote/file /local/path/to/copy/to/

search for case-insensitive index.php in current dir

find ./ -iname "index.php"

search all files (but .svn) and look for string myFunction