Skip to content

Instantly share code, notes, and snippets.

View AmruthPillai's full-sized avatar
🎯
Channelling my Inner Chi

Amruth Pillai AmruthPillai

🎯
Channelling my Inner Chi
View GitHub Profile
@AmruthPillai
AmruthPillai / javascriptreact.json
Last active July 7, 2020 17:15
Import CSS Module with Current React Component Name
{
"Import CSS Module": {
"prefix": "imcss",
"body": [
"import styles from \"./$TM_FILENAME_BASE.module.css\";",
"$2",
],
"description": "Import CSS Module with Current React Component Name"
}
}
@AmruthPillai
AmruthPillai / vercel-now-zoho-mail-setup.md
Last active April 28, 2023 07:45
Zeit/Vercel Now CLI: Zoho Mail Setup

Run these lines on your command line one-by-one to ensure they are properly set. Make sure you replace the yourdomain.com, dkimKey and verifyCode variables before running.

now dns add yourdomain.com '@' TXT zoho-verification=verifyCode
now dns add yourdomain.com '@' MX mx.zoho.com 10
now dns add yourdomain.com '@' MX mx2.zoho.com 20
now dns add yourdomain.com '@' MX mx3.zoho.com 50

# SPF
@AmruthPillai
AmruthPillai / GitHubContributors.vue
Last active March 29, 2020 12:12
A Vue Component that Displays a Grid of Users who have Contributed to a GitHub Repo, used with VuePress for Documentation
<template>
<div class="contributors">
<div v-for="i in items">
<a :href="i.html_url" target="_blank" rel="noopener noreferrer">
<img :src="i.avatar_url" />
</a>
</div>
</div>
</template>
@AmruthPillai
AmruthPillai / encrypt.dart
Created March 8, 2020 12:01
Be Thrifty Today - Encryption
import 'package:encrypt/encrypt.dart';
const CRYPT_KEY = '';
String encrypt(String text) {
if (text == null || text.isEmpty) return null;
final key = Key.fromUtf8(CRYPT_KEY);
final encrypter = Encrypter(AES(key, mode: AESMode.ecb));
return encrypter.encrypt(text).base64;
}
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>CSS Grid Playground</title>
@AmruthPillai
AmruthPillai / index.html
Created May 12, 2018 15:47
Learn Bootstrap 4 in under 5 minutes
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Fake Co.</title>
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.1.1/css/bootstrap.min.css" integrity="sha384-WskhaSGFgHYWDcbwN70/dfYBj47jz9qbsMId/iRN3ewGhXQFZCSftd1LZCfmhktB"
crossorigin="anonymous">
@AmruthPillai
AmruthPillai / Program52.py
Created August 21, 2017 14:30
Write a program that repeatedly prompts a user for integer numbers until the user enters 'done'. Once 'done' is entered, print out the largest and smallest of the numbers. If the user enters anything other than a valid number catch it with a try/except and put out an appropriate message and ignore the number.
"""
Write a program that repeatedly prompts a user for integer numbers until the user enters 'done'. Once 'done' is entered, print out the largest and smallest of the numbers. If the user enters anything other than a valid number catch it with a try/except and put out an appropriate message and ignore the number.
"""
largest = None
smallest = None
while True:
try:
num = raw_input("Enter a number: ")
@AmruthPillai
AmruthPillai / rsa.c
Created August 8, 2017 05:14
RSA Algorithm in C
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
int checkPrime(int n) {
int i;
int m = n / 2;
for (i = 2; i <= m; i++) {
if (n % i == 0) {
@AmruthPillai
AmruthPillai / TriangularNumbers.java
Created July 22, 2017 17:57
Any of the series of numbers (1, 3, 6, 10, 15, etc.) obtained by continued summation of the natural numbers 1, 2, 3, 4, 5, etc. Read more here: https://www.mathsisfun.com/algebra/triangular-numbers.html
public class TriangularNumbers {
public static void main(String[] args) {
int n = 0;
for (int i = 1; i <= 10; i++)
System.out.println(n += i);
}
@AmruthPillai
AmruthPillai / install-lamp-1604.sh
Created July 14, 2017 09:51
Installing Apache 2.4, PHP 7.1, MySQL 5.7.18 & phpMyAdmin 4.5.4 on Ubuntu 16.04
#!/bin/bash
# Update Indices
sudo apt-get update
# Apache 2.4
sudo apt-get -y install apache2
# PHP 7.1
sudo apt-get -y remove php*