echo `ifconfig $(netstat -nr | grep -e default -e "^0\.0\.0\.0" | head -1 | awk '{print $NF}') | grep -e "inet " | sed -e 's/.*inet //' -e 's/ .*//' -e 's/.*\://'`
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Login via SSH with password (LOCAL SERVER) | |
> ssh [email protected] | |
# Create folder, file, install Apache (Just messing around) | |
mkdir test | |
cd test | |
touch hello.txt | |
sudo apt-get install apache2 | |
# Generate Keys |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
set runtimepath+=~/.vim | |
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" | |
" => General | |
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" | |
" Sets how many lines of history VIM has to remember | |
set history=500 | |
" Set to auto read when a file is changed from the outside | |
set autoread |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function setup() { | |
createCanvas(720, 480); | |
strokeWeight(2); | |
ellipseMode(RADIUS); | |
} | |
function draw() { | |
background(204); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div class='container'> | |
<div class="row"> | |
<div class="col-md-4 epack"> | |
<h3>Header</h3> | |
</div> | |
<div class="col-md-4 success box-inset"> | |
<span class="green">Your data has been saved successfully!</span> | |
</div> | |
<div class="col-md-4 login"> | |
<h4>vishal anand</h4> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public delegate int MathOperationDelegate(int x, int y); | |
class Program | |
{ | |
static void Main(string[] args) | |
{ | |
MathOperationDelegate operationDelegate = null; | |
//No need to create a seperate method |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
\w+@\w+\.\w+(,\s*\w+@\w+\.\w+)* | |
from: https://dzone.com/articles/regular-expression-to-validate-a-comma-separated-l?edition=206671&utm_source=Daily%20Digest&utm_medium=email&utm_campaign=dd%202016-08-27 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Person { } | |
class Man Person { } | |
class Program | |
{ | |
// Define the delegate. | |
public delegate Person HandlerMethod(); | |
public delegate Person HandlerMehtod2(Man p); | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
namespace DelegateLearning | |
{ | |
public delegate int MathematicalOperationDelegate(int x, int y); //declare | |
public enum MathematicalOperation | |
{ | |
Add, | |
Substract, | |
Multiply, | |
Divide |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.class public auto ansi sealed Learning.MyDelegate extends [mscorlib]System.MulticastDelegate | |
{ | |
// Methods | |
.method public hidebysig specialname rtspecialname | |
instance void .ctor ( | |
object 'object', | |
native int 'method' | |
) runtime managed | |
{ | |
NewerOlder