Skip to content

Instantly share code, notes, and snippets.

@farukcan
farukcan / Code.gs
Created May 26, 2023 08:49
App Script Chat Bot Sample
// 1) Copy or Duplicate this spreadsheet (and this AppsScript project)
//
// 2) Run "setup" function once
// - Use the menu above.
//
// 3) Create Google Cloud Service Project. And copy the Project Number.
//
// 4) This > Project Settings > Set GCM project number
//
// 5) Add the line "chat": {} to your manifest file. (IMPORTANT)
@farukcan
farukcan / sample.md
Last active May 2, 2023 15:34
Postgress net core

Program.cs

Note: i've more a gist about it.

using Microsoft.EntityFrameworkCore;
builder.Services.AddDbContext<Context>(options =>
    options.UseNpgsql(System.Environment.GetEnvironmentVariable("POSTGRESQL_STRING") ?? throw new InvalidOperationException("Connection string 'POSTGRESQL_STRING' not found."),
    options => options.EnableRetryOnFailure().SetPostgresVersion(new Version(9, 6))
));
@farukcan
farukcan / npm.json
Last active March 2, 2023 20:45
Visual Powershell - NPM Commands
{
"Name": "NPM Commands",
"Author": "farukcan",
"Website": "https://farukcan.net",
"Commands": [
{
"Name": "🚀Initialize package.json",
"Scripts": [
"npm init -y"
]
@farukcan
farukcan / chocolatey.json
Last active February 28, 2023 17:50
Visual Powershell - App Installer (Chocolatey)
{
"Name": "App Installer (Chocolatey)",
"Author": "farukcan",
"Website": "https://farukcan.net",
"Commands": [
{
"Name": "⚠️Run Visual PS as administrator",
"Scripts": [
"echo \"This command requires Adminisrator rights. Right click the Visual PS and open as administrator\""
]
@farukcan
farukcan / dotnet.json
Last active February 28, 2023 14:09
Visual Powershell .NET Core Commands
{
"Name": ".NET Core",
"Author": "farukcan",
"Website": "https://farukcan.net",
"Commands": [
{
"Name": "🆕 New Project (with Template)",
"Scripts": [
"dotnet new \"{text:Template (short-name)}\" --name \"{text:Project Name}\" {text:Extra parameters (optional)}"
]
@farukcan
farukcan / restapi.json
Created February 27, 2023 23:10
Visual Powershell - Useful Rest APIs
{
"Name": "Useful Rest APIs",
"Author": "farukcan",
"Website": "https://farukcan.net",
"Commands": [
{
"Name": "Currency Converter",
"Scripts": [
"Invoke-RestMethod \"https://cdn.jsdelivr.net/gh/fawazahmed0/currency-api@1/latest/currencies/{text:Currency From (3 character format,lower case)}/{text:Currency To}.json\""
]
@farukcan
farukcan / FilesAndFolders.json
Last active February 27, 2023 21:25
Visual Powershell Files and Folders
{
"Name": "Files and Folders",
"Author": "farukcan",
"Website": "https://github.com/farukcan/visualps",
"Commands": [
{
"Name": "🔍📁 List Workspace",
"Scripts": [
"ls"
]
@farukcan
farukcan / repo.json
Last active March 28, 2023 15:23
VisualPS Test Dialog Types
{
"Name": "Test & Examples",
"Author": "farukcan",
"Website": "https://farukcan.net",
"Commands": [
{
"Name": "🖹 Text Dialog",
"Scripts": [
"echo \"Your message is {text:Message}\""
]
@farukcan
farukcan / package.json
Last active February 28, 2023 19:35
Main Visual PowerShell Package
[
"https://gist.github.com/farukcan/930ae86c1516371cd6e33028a470031d",
"https://gist.github.com/farukcan/ebfe20cef43d119ebef0ad2e5758db1a",
"https://gist.github.com/farukcan/4dbd669a37dc1bc9d7d9df38c85981ca",
"https://gist.github.com/farukcan/06cd5bf587bcdd807f0a9b6d4d7945b2",
"https://gist.github.com/farukcan/54d4f13ac334981d47efe4efc708553c",
"https://gist.github.com/farukcan/390cb44bebef103fbc0779c74abef58e",
"https://gist.github.com/farukcan/65ad160041838b7dea6d57d8f2d78340"
]
@farukcan
farukcan / git.json
Last active February 28, 2023 19:51
Git Commands - Visual Powershell Repository
{
"Name" : "Git Commands",
"Author": "farukcan",
"Website" : "https:/farukcan.net",
"Commands" : [
{
"Name" : "🚀 Initialize folder",
"Scripts" : ["git init"]
},
{