Skip to content

Instantly share code, notes, and snippets.

View sudarshann's full-sized avatar
💭
Modernizing

Sudarshan Anbazhagan sudarshann

💭
Modernizing
View GitHub Profile
@sudarshann
sudarshann / render_countries.php
Last active March 16, 2020 19:25
Render PHP array of all countries as option tag for select
function get_countries_options($selected_country = "") {
$options = '';
$countries = array
(
'AF' => 'Afghanistan',
'AX' => 'Aland Islands',
'AL' => 'Albania',
'DZ' => 'Algeria',
'AS' => 'American Samoa',
<!-- Offers -->
<style>
.capitools-promo-products-block{
text-align: center;
}
.capitools-promo-products-block a img{
max-width:32%;
margin: 20px 0;
}
@media only screen and (max-width: 760px) {
jQuery( document ).ready( function() {
jQuery( document ).on( 'nfFormSubmitResponse', function(event, response, id) {
console.log("Google Analytics Ninja form Tracking Triggered ", event, response);
if(typeof ga === "undefined"){
return;
}
if(response.id === "1"){
/* Limit by form id */
@sudarshann
sudarshann / it-jonction-promo-banners
Last active January 7, 2020 10:46
it-jonction-promo-banners for floating banner on top
<div hidden id="it-jonction-promo-banners-tag-desktop">
<div id="promo-banners-tag-desktop-block" class="promo-banners-tag hide-on-mobile">
<!-- For Desktop Collapsed view -->
<img
class="img-responsive promo-banners-tag-desktop-block open"
id="desktop-open-code"
src="!!! Change This here !!!"
alt="promo-banners-tag">
<!-- For Desktop Expanded view -->
@sudarshann
sudarshann / gist:71a353d21124515d34c5493f284afe36
Last active July 27, 2019 19:36 — forked from adamstac/gist:7462202
Install and configure Sendmail on Ubuntu

Install and configure Sendmail on Ubuntu

This should help you get Sendmail installed with basic configuration on Ubuntu.

  1. If sendmail isn't installed, install it: sudo apt-get install sendmail
  2. Configure /etc/hosts file: nano /etc/hosts
  3. Make sure the line looks like this: 127.0.0.1 localhost yourhostname
  4. Run Sendmail's config and answer 'Y' to everything: sudo sendmailconfig
  5. Restart apache sudo service apache2 restart
  6. Test with echo "test message" | sendmail -v [email protected]
@sudarshann
sudarshann / countries.json
Created May 16, 2017 21:20 — forked from keeguon/countries.json
A list of countries in JSON
[
{name: 'Afghanistan', code: 'AF'},
{name: 'Åland Islands', code: 'AX'},
{name: 'Albania', code: 'AL'},
{name: 'Algeria', code: 'DZ'},
{name: 'American Samoa', code: 'AS'},
{name: 'AndorrA', code: 'AD'},
{name: 'Angola', code: 'AO'},
{name: 'Anguilla', code: 'AI'},
{name: 'Antarctica', code: 'AQ'},
#! /bin/bash
#
# Diffusion youtube avec ffmpeg
# Configurer youtube avec une résolution 720p. La vidéo n'est pas scalée.
VBR="2500k" # Bitrate de la vidéo en sortie
FPS="30" # FPS de la vidéo en sortie
QUAL="medium" # Preset de qualité FFMPEG
YOUTUBE_URL="rtmp://a.rtmp.youtube.com/live2" # URL de base RTMP youtube