Skip to content

Instantly share code, notes, and snippets.

View anton-dudarev's full-sized avatar
🎯
Focusing

Anoubis anton-dudarev

🎯
Focusing
View GitHub Profile
# Converts a JSONL file generated with telegram-history-dump (1) to CSV
# Usage: python telegram-csv.py <path to json file> <path to output csv file>
# Example: python telegram-csv.py Bob.json Bob.csv
# 1: https://github.com/tvdstaaij/telegram-history-dump
from datetime import datetime
import unicodecsv as csv
import json, sys
def get_isodate(msg):
date = msg.get("date", None)
@mhawksey
mhawksey / code.gs
Created April 26, 2019 18:37
Example Google Apps Script custom sheet function example. For more info see https://mashe.hawksey.info?p=19219
/**
* Generates a SHA-256 hash of a text input.
*
* @param {String||Array} value to SHA-256 hash.
* @param {String} key to use to generate the hash with.
* @return the SHA-256 hash of the value
* @customfunction
*/
function HASH(value, key) {
if (typeof key !== 'string'){ // test the key is a string
@priyankavergadia
priyankavergadia / index.js
Created April 26, 2019 06:31
Cloud Function for Scheduling Appointments with Dialogflow using Google Calendar
/*Copyright 2019 Google LLC.
SPDX-License-Identifier: Apache-2.0
*/
'use strict';
const functions = require('firebase-functions');
const {google} = require('googleapis');
const {WebhookClient} = require('dialogflow-fulfillment');
/**
* Copyright 2017, Google, Inc.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
@zeuslawyer
zeuslawyer / DialogflowApp
Last active May 25, 2019 22:08
Dialogflow App Fulfilment via EXPRESS server on Cloud Functions
const {
dialogflow,
Permission,
Suggestions,
BasicCard
} = require("actions-on-google");
// Instantiate the Dialogflow client.
const app = dialogflow({ debug: true });
@vijaysiva5555
vijaysiva5555 / index.html
Created February 20, 2019 08:48
Make AJAX Calls to Third Party APIs from DialogFlow V2
<h1>Hello World!</h1>
@pcgeek86
pcgeek86 / cheatsheet.ps1
Last active June 13, 2025 08:11
PowerShell Cheat Sheet / Quick Reference
Get-Command # Retrieves a list of all the commands available to PowerShell
# (native binaries in $env:PATH + cmdlets / functions from PowerShell modules)
Get-Command -Module Microsoft* # Retrieves a list of all the PowerShell commands exported from modules named Microsoft*
Get-Command -Name *item # Retrieves a list of all commands (native binaries + PowerShell commands) ending in "item"
Get-Help # Get all help topics
Get-Help -Name about_Variables # Get help for a specific about_* topic (aka. man page)
Get-Help -Name Get-Command # Get help for a specific PowerShell function
Get-Help -Name Get-Command -Parameter Module # Get help for a specific parameter on a specific command
@Fleker
Fleker / index.js
Created February 5, 2019 16:45
Using Cloud Storage for Firebase for hosting rich media in your Actions
const functions = require('firebase-functions');
const admin = require('firebase-admin');
admin.initializeApp(functions.config().firebase);
const bucket = admin.storage().bucket();
const bucketAccessConfig = {
action: 'read',
expires: Date.now() + 1000 * 60 * 60
};
const {dialogflow, Image, MediaObject} = require('actions-on-google');
@Anshul0305
Anshul0305 / Buttons_Template.js
Last active March 9, 2025 21:16
Facebook Code Snippets
{
"facebook":{
"attachment":{
"type":"template",
"payload":{
"template_type":"button",
"text":"What do you want to do next?",
"buttons":[
{
"type":"web_url",