Skip to content

Instantly share code, notes, and snippets.

View harikt's full-sized avatar
⛱️
Tanvish Technologies

Hari K T harikt

⛱️
Tanvish Technologies
View GitHub Profile
@harikt
harikt / youtube.txt
Created April 18, 2023 12:50 — forked from iredun/youtube.txt
Youtube API get thumbnail image
Each YouTube video has 4 generated images. They are predictably formatted as follows:
http://img.youtube.com/vi/<insert-youtube-video-id-here>/0.jpg
http://img.youtube.com/vi/<insert-youtube-video-id-here>/1.jpg
http://img.youtube.com/vi/<insert-youtube-video-id-here>/2.jpg
http://img.youtube.com/vi/<insert-youtube-video-id-here>/3.jpg
The first one in the list is a full size image and others are thumbnail images. The default thumbnail image (ie. one of 1.jpg, 2.jpg, 3.jpg) is:
http://img.youtube.com/vi/<insert-youtube-video-id-here>/default.jpg
For the high quality version of the thumbnail use a url similar to this:
@harikt
harikt / installing.sh
Created January 5, 2012 18:47
Compile and Install PHP 5.4 from Source
#Download Apache and extract it
$ ./configure --help
#You will get a list of options, run with enable-so
$ ./configure --enable-so
$ make
@harikt
harikt / Howto.md
Created December 23, 2021 06:20 — forked from brentjanderson/Howto.md
SSH Tunneling with Firefox

Sometimes it is useful to route traffic through a different machine for testing or development. At work, we have a VPN to a remote facility that we haven't bothered to fix for routing, so the only way to access a certain machine over that VPN is via an SSH tunnel to a machine that is reachable over the VPN. Other times, I have used this technique to test internet-facing requests against sites I am developing. It is pretty easy, and if you don't use firefox regularly, you can treat Firefox as your "Proxy" browser and other browsers can use a normal configuration (Although you can also configure an entire system to use the proxy, other articles exists that discuss this potential).

  1. Open a terminal
@harikt
harikt / geonames.org
Created October 3, 2011 11:40
Import Geonames Database

First up, thanks to everyone in this thread… what i post is what took me a while to figure out (character set in load data and some other errors in the original script (like capital I in countryInfo etc).

Original Post Over : http://forum.geonames.org/gforum/posts/list/45/732.page

save as import.sql (update)

Code: CREATE DATABASE geonames; USE geonames;

Set the base image to Ubuntu must be first instruction - use docker search to find images

FROM ubuntu # <image>
FROM ubuntu:latest # - <image>:<tag>
FROM ubuntu:precise (LTS)

Set the maintainer info

@harikt
harikt / gist:c149f7d52e57a73b1e7adbf5af36e920
Created October 28, 2020 13:46 — forked from tayvano/gist:6e2d456a9897f55025e25035478a3a50
complete list of ffmpeg flags / commands
Originall From: Posted 2015-05-29 http://ubwg.net/b/full-list-of-ffmpeg-flags-and-options
This is the complete list that’s outputted by ffmpeg when running ffmpeg -h full.
usage: ffmpeg [options] [[infile options] -i infile]… {[outfile options] outfile}…
Getting help:
-h — print basic options
-h long — print more options
-h full — print all options (including all format and codec specific options, very long)
@harikt
harikt / zookeeper-solr-cloud.md
Created October 13, 2020 11:35 — forked from kalharbi/zookeeper-solr-cloud.md
Setting up an external Zookeeper Solr Cluster

Setting up an external Zookeeper Solr Cluster

This is a step by step instruction on how to create a cluster that has three Solr nodes running in cloud mode. These instructions should work on both a local cluster (for testing) and a remote cluster where each server runs in its own physical machine. This was tested on Solr version 5.4.1 and Zookeeper version 3.4.6

Installing Solr and Zookeeper

  • Download and extract Solr:
    • curl -O http://archive.apache.org/dist/lucene/solr/5.5.3/solr-5.5.3.tgz
    • mkdir /opt/solr
@harikt
harikt / SolrQuerySyntaxPrimer.md
Created July 13, 2020 15:26 — forked from mankyKitty/SolrQuerySyntaxPrimer.md
The documentation around the basics of the Solr query syntax is terrible, this is an attempt to alleviate the doc-shock associated with trying to learn some fundamentals.

Solr Query Syntax Basics

This is a super basic beginners guide to Solr Lucene query syntax. We're going to cover running a straightforward query, as well as some of the more useful functionality such as filtering and creating facets. We'll point out some things you can't do and generally give you enough instruction so that you can get yourself into trouble.

For testing you need a REST client capable of sending requests to your Solr instance. Either RESTClient for Firefox or Postman for Chrome are good choices.

Misc

Request Specific Fields

To specify a list of fields to return instead of the default Solr response use fl and provide a comma delimited list of fields:

@harikt
harikt / router-middleware.php
Created January 21, 2015 14:48
Conduit router middleware example
<?php
require dirname(__DIR__) . '/vendor/autoload.php';
use Phly\Conduit\Middleware;
use Phly\Http\Server;
$app = new Middleware();
$router = new \Aura\Router\Router(
new \Aura\Router\RouteCollection(new \Aura\Router\RouteFactory),
new \Aura\Router\Generator
@harikt
harikt / composer.json
Last active December 27, 2019 06:42
Aura.Router and Aura.Dispatcher
{
"require": {
"aura/router": "^3.0",
"aura/dispatcher": "^2.0",
"zendframework/zend-diactoros": "^2.2"
}
}