Skip to content

Instantly share code, notes, and snippets.

View ArionMiles's full-sized avatar

Kanishk Singh ArionMiles

View GitHub Profile
{
"$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
"contentVersion": "1.0.0.0",
"parameters": {
"name": {
"defaultValue": null,
"type": "string",
"minLength": 5,
"maxLength": 63,
"metadata": {
{
"$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
"contentVersion": "1.0.0.0",
"parameters": {
"name": {
"defaultValue": null,
"type": "string",
"minLength": 5,
"maxLength": 63,
"metadata": {
@ArionMiles
ArionMiles / template.yaml
Last active May 6, 2020 13:00
Sample template for blogpost on packing ELF binaries into lambda layers
AWSTemplateFormatVersion: '2010-09-09'
Transform: 'AWS::Serverless-2016-10-31'
Description: Serverless application to generate random identities.
Resources:
RigFunction:
Type: 'AWS::Serverless::Function'
Properties:
Handler: lambda_function.lambda_handler
Runtime: python3.8
CodeUri: './src/'
'''Copies data of one table from DB1 to same table in DB2'''
from models_old import Chat as Chat1
from database_old import init_db as init1
from database import init_db as init2, db_session as db_s2
from models import Chat as Chat2
def main():
init1() #Start DB1
init_db() #Start DB2
@ArionMiles
ArionMiles / slack_emoji_downloader.py
Last active December 30, 2019 19:20
Download slack custom emojis
# Author: ArionMiles (Kanishk Singh)
#
# slack_emojis.json is json data sent by emoji.adminList endpoint of slack.
# INSTRUCTIONS:
# 1. Go to https://{YOUR_SLACK}.slack.com/customize/emoji
#
# 2. Open Dev Tools -> Network -> Filter by XHR
#
# 3. Reload the page, go to "emoji.adminList?_x_id=XXXXXXXX" endpoint
#