Skip to content

Instantly share code, notes, and snippets.

View MrSunshyne's full-sized avatar
🇲🇺
productivity mode engaged

Sandeep Ramgolam MrSunshyne

🇲🇺
productivity mode engaged
View GitHub Profile
ruby -e "open(`gem which rubygems`.sub(/\.rb\s*\z/, '/ssl_certs/AddTrustExternalCARoot-2048.pem'), 'wb').write %(-----BEGIN CERTIFICATE-----\nMIIENjCCAx6gAwIBAgIBATANBgkqhkiG9w0BAQUFADBvMQswCQYDVQQGEwJTRTEU\nMBIGA1UEChMLQWRkVHJ1c3QgQUIxJjAkBgNVBAsTHUFkZFRydXN0IEV4dGVybmFs\nIFRUUCBOZXR3b3JrMSIwIAYDVQQDExlBZGRUcnVzdCBFeHRlcm5hbCBDQSBSb290\nMB4XDTAwMDUzMDEwNDgzOFoXDTIwMDUzMDEwNDgzOFowbzELMAkGA1UEBhMCU0Ux\nFDASBgNVBAoTC0FkZFRydXN0IEFCMSYwJAYDVQQLEx1BZGRUcnVzdCBFeHRlcm5h\nbCBUVFAgTmV0d29yazEiMCAGA1UEAxMZQWRkVHJ1c3QgRXh0ZXJuYWwgQ0EgUm9v\ndDCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBALf3GjPm8gAELTngTlvt\nH7xsD821+iO2zt6bETOXpClMfZOfvUq8k+0DGuOPz+VtUFrWlymUWoCwSXrbLpX9\nuMq/NzgtHj6RQa1wVsfwTz/oMp50ysiQVOnGXw94nZpAPA6sYapeFI+eh6FqUNzX\nmk6vBbOmcZSccbNQYArHE504B4YCqOmoaSYYkKtMsE8jqzpPhNjfzp/haW+710LX\na0Tkx63ubUFfclpxCDezeWWkWaCUN/cALw3CknLa0Dhy2xSoRcRdKn23tNbE7qzN\nE0S3ySvdQwAl+mG5aWpYIxG3pzOPVnVZ9c0p10a3CitlttNCbxWyuHv77+ldU9U0\nWicCAwEAAaOB3DCB2TAdBgNVHQ4EFgQUrb2YejS0Jvf6xCZU7wO94CTLVBowCwYD\nVR0PBAQDAgEGMA8GA1UdEwEB
@MrSunshyne
MrSunshyne / Countries.js
Created May 28, 2013 11:29
This gist provides a reliable list of Countries accompanied with relevant information that might come in handy while building web applications.
var countries = [
{
"country":"Andorra",
"alpha_3_code":"AND",
"numeric_code":20,
"iso_3166_2 codes":"ISO 3166-2:AD",
"alpha_2_code":"AD",
"latitude":42.5,
"longitude":1.5
},
@MrSunshyne
MrSunshyne / grid.css
Created August 30, 2017 16:54
Grid Template Area Step 1
.thegrid {
display:grid;
grid-template-columns: 1fr 1fr 1fr 1fr;
grid-template-rows: repeat(3, minmax(150px,auto));
grid-gap: var(--gap);
grid-template-areas: "home-primary home-primary home-primary home-primary" "home-secondary home-secondary home-secondary home-secondary" "pov autres autres ad2";
}
@MrSunshyne
MrSunshyne / youtube-dl-playlist.sh
Created June 17, 2019 06:54
Download Youtube Playlist using youtube-dl
youtube-dl --extract-audio --audio-format mp3 -o "%(title)s.%(ext)s" <youtube-playlist-url>
Computer Information:
Manufacturer: Unknown
Model: Unknown
Form Factor: Desktop
No Touch Input Detected
Processor Information:
CPU Vendor: GenuineIntel
CPU Brand: Intel(R) Core(TM) i7-2600 CPU @ 3.40GHz
CPU Family: 0x6
@MrSunshyne
MrSunshyne / countries.js
Created March 12, 2020 08:30
Countries
const countries = [
"Afghanistan",
"Austria",
"Azerbaijan",
"Bahamas",
"Bahrain",
"Bangladesh",
"Barbados",
"Belarus",
"Belgium",
@MrSunshyne
MrSunshyne / affected-countries.js
Last active March 12, 2020 12:21
Array of affected countries from CDC website
// Open the developer toosl console and execute the folowing command to get an array of countries listed on the page.
// Right click and copy object for convenience.
// For use on this page: https://www.cdc.gov/coronavirus/2019-ncov/locations-confirmed-cases.html
let nodes = document.querySelectorAll(".syndicate li");
let list = [].slice.call(nodes);
let innertext = list.map(function(e) { return e.innerText; });
console.log(innertext);
@MrSunshyne
MrSunshyne / InputText.vue
Created May 8, 2020 10:40
Vue transparent wrapper template
<template>
<div>
<label>{{ label }}</label>
<input
v-on="listeners"
v-bind="$attrs"
/>
</div>
</template>
@MrSunshyne
MrSunshyne / Makefile
Created May 28, 2020 15:38
Directus Operations
#!make
include .env
export $(shell sed 's/=.*//' .env)
build:
@echo "hi ${SOURCE_DATABASE_NAME}"
export:
@(docker exec -i ${SOURCE_CONTAINER_ID} mysqldump -u ${SOURCE_DATABASE_USERNAME} -p${SOURCE_DATABASE_PASSWORD} ${SOURCE_DATABASE_NAME}) > ../directusdb/dump.sql
@MrSunshyne
MrSunshyne / Default (Linux).sublime-keymap
Created January 14, 2021 06:39
Sublime Text 3 User keymaps to have VS Code Keybindings
[
{ "keys": ["ctrl+shift+l"], "command": "find_all_under" },
{ "keys": ["ctrl+f2"], "command": "find_all_under" },
{ "keys": ["alt+shift+i"], "command": "split_selection_into_lines" },
{ "keys": ["ctrl+b"], "command": "toggle_side_bar" },
{ "keys": ["ctrl+shift+b"], "command": "build" },
{ "keys": ["alt+up"], "command": "swap_line_up" },
{ "keys": ["alt+down"], "command": "swap_line_down" },
{ "keys": ["ctrl+shift+up"], "command": "select_lines", "args": {"forward": false} },
{ "keys": ["ctrl+shift+down"], "command": "select_lines", "args": {"forward": true} },