Skip to content

Instantly share code, notes, and snippets.

View arn-ob's full-sized avatar
☠️
__worker__

Arnob arn-ob

☠️
__worker__
View GitHub Profile
@arn-ob
arn-ob / gitUpload.txt
Created July 20, 2016 18:59
Git Repository Upload Command
Open Git Bash.
Change the current working directory to your local project.
Initialize the local directory as a Git repository.
-> git init
Add the files in your new local repository. This stages them for the first commit.
-> git add .
@arn-ob
arn-ob / Get-MP3MetaData.ps1
Created October 15, 2016 16:29 — forked from PrateekKumarSingh/Get-MP3MetaData.ps1
Get MetaData from a .MP3 or .MP4 file
Function Get-MP3MetaData
{
[CmdletBinding()]
[Alias()]
[OutputType([Psobject])]
Param
(
[String] [Parameter(Mandatory=$true, ValueFromPipeline=$true)] $Directory
)
@arn-ob
arn-ob / gist:cca5db64243a157a3ea552ef06b1e593
Created December 3, 2016 05:40 — forked from alishutc/gist:a6b1b0fc11a28a627897
Play a random embedded youtube video
<!DOCTYPE html>
<html>
<head>
<script>
var videos = ["https://www.youtube.com/embed/9bZkp7q19f0", "https://www.youtube.com/embed/dQw4w9WgXcQ"];
window.onload = function () {
var playerDiv = document.getElementById("random_player");
var player = document.createElement("IFRAME");
var randomVideoUrl = videos[Math.floor(Math.random() * videos.length)];
@arn-ob
arn-ob / auto-move-downloads.py
Created December 4, 2016 15:10 — forked from leninhasda/auto-move-downloads.py
utility script to automatically move the specified files from downloads directory to proper directory
# import
import os
from os import path, listdir as list_dir, rename as move
from os.path import isdir as is_dir, isfile as is_file
from pprint import pprint
import shutil
# global variables
#==================
using System;
using System.Configuration;
using System.Linq;
using System.Reflection;
using System.Threading;
using System.Threading.Tasks;
using log4net;
namespace Watson.Integration
{
@arn-ob
arn-ob / mountDisk.txt
Last active June 12, 2017 06:48
Mount disk and give the direct location to the website in Linux
Mount Disk and mapped to the site . This Test at Apache2
1. sudo mkdir /mountLocation
2. sudo mount /dev/whatever /mountLocation
3. Locate the dir to the apanche2 config <Directory>
Config
</Directory>
4. At the Site config file Add Aliens
Alias "/DirName/" "/Location/"
@arn-ob
arn-ob / gethint.php
Last active July 12, 2017 22:17
The XMLHttpRequest Object From W3School
<?php
// Array with names
$a[] = "Anna";
$a[] = "Brittany";
$a[] = "Cinderella";
$a[] = "Diana";
$a[] = "Eva";
$a[] = "Fiona";
$a[] = "Gunda";
$a[] = "Hege";
@arn-ob
arn-ob / jsShoppingCart.html
Created July 18, 2017 02:46
Shopping Cart at HTML and JS
<html>
<head>
<script>
//create array that will hold all ordered products
var shoppingCart = [];
//this function manipulates DOM and displays content of our shopping cart
function displayShoppingCart(){
var orderedProductsTblBody=document.getElementById("orderedProductsTblBody");
//ensure we delete all previously added rows from ordered products table
@arn-ob
arn-ob / CalbackNode.js
Last active July 19, 2017 06:20
[NodeJs] Reducing nesting by creating Intermediary Function and Also same Function by using calback
//use of callbacks
var http = require('http');
var fs = require('fs');
http.createServer(function(req,res){
if(req.url== '/')
{
fs.readFile('title.json',function(err,data){
@arn-ob
arn-ob / InData.php
Created July 19, 2017 17:03
Ajax code Data get from HTML Input
<?php
$servername = "localhost";
$username = "root";
$password = "";
$dbname = "try";
$name = $_POST["name"];
// Create connection