Skip to content

Instantly share code, notes, and snippets.

View codingonHP's full-sized avatar
🎯
Focusing

Hello World codingonHP

🎯
Focusing
  • India
View GitHub Profile
@codingonHP
codingonHP / etc-hosts-on-win.md
Created September 4, 2018 09:58 — forked from zenorocha/etc-hosts-on-win.md
/etc/hosts on Windows

1. Get your IP Address

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/.*\://'`

2. Modify your hosts file

notepad

@codingonHP
codingonHP / ssh.txt
Created July 14, 2018 19:49 — forked from bradtraversy/ssh.md
SSH & DevOps Crash Course Snippets
# Login via SSH with password (LOCAL SERVER)
> ssh brad@192.168.1.29
# Create folder, file, install Apache (Just messing around)
mkdir test
cd test
touch hello.txt
sudo apt-get install apache2
# Generate Keys
@codingonHP
codingonHP / my-vimrc
Created May 19, 2018 19:33
My minimal vimrc based on various internet sources.
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
@codingonHP
codingonHP / p5.js
Created September 19, 2016 13:35
p5.js robot
function setup() {
createCanvas(720, 480);
strokeWeight(2);
ellipseMode(RADIUS);
}
function draw() {
background(204);
@codingonHP
codingonHP / index.html
Created September 7, 2016 06:56
Show message with sideways inset
<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>
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
@codingonHP
codingonHP / gist:6649c55b0b81fe4abc731b8f7116a382
Last active August 27, 2016 19:02
create a regular expression to validate the format of a comma-separated list of email addresses.
\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
 class Person { }
    class Man Person { }
    class Program
    {
        // Define the delegate.
        public delegate Person HandlerMethod();
        public delegate Person HandlerMehtod2(Man p);
namespace DelegateLearning
{
    public delegate int MathematicalOperationDelegate(int x, int y); //declare
    public enum MathematicalOperation
    {
      Add,
      Substract,
      Multiply,
      Divide
@codingonHP
codingonHP / decompiled-delegates.cs
Created August 27, 2016 07:40
decompiled-delegates
.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
{