Skip to content

Instantly share code, notes, and snippets.

View vkuberan's full-sized avatar
😎
If your house is on fire, warm yourself by it.

Velmurugan Kuberan vkuberan

😎
If your house is on fire, warm yourself by it.
View GitHub Profile
<VirtualHost *:80>
# The ServerName directive sets the request scheme, hostname and port that
# the server uses to identify itself. This is used when creating
# redirection URLs. In the context of virtual hosts, the ServerName
# specifies what hostname must appear in the request's Host: header to
# match this virtual host. For the default virtual host (this file) this
# value is not decisive as it is used as a last resort host regardless.
# However, you must set it for any further virtual host explicitly.
# ServerName www.example.com
version: '3.8'
services:
ubuntu:
build: .
container_name: ubuntu_stack
restart: unless-stopped
stdin_open: true
tty: true
volumes:
FROM ubuntu:latest
ENV DEBIAN_FRONTEND=noninteractive
ENV TZ=Asia/Kolkata
LABEL maintainer="vkuberan@gmail.com"
CMD echo "Installing Latest Ubuntu along with Apache and PHP...."
RUN apt-get update && apt-get upgrade
@vkuberan
vkuberan / httpd-xampp5.6.conf
Created February 22, 2021 08:29 — forked from mpalencia/httpd-xampp5.6.conf
Additional setting for XAMPP running PHP 7.2 with PHP 5.6
#
# XAMPP settings
#
<IfModule env_module>
SetEnv MIBDIRS "C:/xampp/php5.6/extras/mibs"
SetEnv MYSQL_HOME "\\xampp\\mysql\\bin"
SetEnv OPENSSL_CONF "C:/xampp/apache/bin/openssl.cnf"
SetEnv PHP_PEAR_SYSCONF_DIR "\\xampp\\php5.6"
SetEnv PHPRC "\\xampp\\php5.6"
# Right Implementation
def cubed(n):
return [(x * x * x) for x in n]
# Wrong Implementation and it will trigger an error
def postive_to_negative(n, j):
return [(x * x * x) for x in n]
numbers = [1, 2, 3, 4, 5]
def squared(numbers):
return [(i * i) for i in numbers]
def high_order_func_demo(transform, numbers):
return transform(numbers)
numbers = [1, 2, 3, 4, 5]
result = high_order_func_demo(squared, numbers)
print(numbers)
<?php
Route::get('customer/delete/{id}', function ($id) {
try {
$customer = App\Customer::find($id);
if($customer->delete()) echo "Customer with ID: $id is deleted";
else echo "Customer with ID: $id is not deleted";
@vkuberan
vkuberan / index.html
Created August 23, 2019 07:19 — forked from jcollins-g/index.html
Sunflower
<!-- Copyright 2011 the Dart project authors. All rights reserved.
Use of this source code is governed by a BSD-style license
that can be found in the LICENSE file. -->
<h2>Dr. Fibonacci's Sunflower Spectacular</h2>
<div>
<canvas id="canvas" width="300" height="300"></canvas>
</div>