Skip to content

Instantly share code, notes, and snippets.

View sudarshann's full-sized avatar
💭
Modernizing

Sudarshan Anbazhagan sudarshann

💭
Modernizing
View GitHub Profile
#! /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
@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'},
@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 your@mail.com
@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 -->
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 */
<!-- 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) {
@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',
<div hidden id="tagManager-tag-manager-promo-desktop">
<div id="tag-manager-promo-desktop-block" class="tag-manager-promo- hide-on-mobile">
<!-- For Desktop Collapsed view -->
<img
class="img-responsive tag-manager-promo-desktop-block close"
id="desktop-open-code"
src=""
alt="tag-manager-promo-">
<!-- For Desktop Expanded view -->
<img
<div hidden id="tagManager-tag-manager-promo-desktop">
<div id="corona-open-modal" class="modal-window">
<div>
<a href="#" title="Close" class="modal-close">Fermer</a>
<h1>INFORMATION</h1>
<p>Notre activité (prise de commandes, suivi de commandes, renseignements techniques, expéditions) continue pendant cette période</p>
<p>Les délais de livraison pourraient parfois être rallongés.<br>N’hésitez pas à contacter notre équipe technique pour toute information ou pour tout renseignement.</p>
<div class="rectangle-1"><p>Livraison offerte à domicile pour toute commande</p></div>
@sudarshann
sudarshann / ACF Country List
Created April 14, 2020 09:49 — forked from yaronguez/ACF Country List
Country list formatted for Advanced Custom Fields select dropdown
afghanistan : Afghanistan
albania : Albania
algeria : Algeria
american_samoa : American Samoa
andorra : Andorra
angola : Angola
anguilla : Anguilla
antigua_and_barbuda : Antigua and Barbuda
argentina : Argentina
armenia : Armenia