This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import functions_framework | |
import requests | |
from pycognito import Cognito | |
from flask import jsonify | |
from datetime import datetime, timedelta | |
from google.cloud import storage | |
import json | |
from dateutil import parser | |
from zoneinfo import ZoneInfo |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
set -euo pipefail | |
# Configuration | |
UPS_NAME="my-ups" | |
UPS_USER="ups-admin" | |
UPS_PASS="super-secret-password" | |
EMAIL_RECIPIENT="[email protected]" | |
CHECK_INTERVAL=10 # Seconds between status checks |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'irb' | |
IRB.init_config(nil) | |
IRB.conf[:PROMPT_MODE] = :DEFAULT | |
IRB.conf[:VERBOSE] = true | |
class IrbStringInputMethod < IRB::InputMethod | |
def initialize(line, output) | |
@line = line | |
@read = false |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# frozen_string_literal: true | |
module Ai | |
class Function | |
# Returns a formatted function payload | |
def to_payload | |
{ | |
"name" => name, | |
"description" => description, | |
"parameters" => parameters, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# frozen_string_literal: true | |
module Views | |
module CssClasses | |
extend ActiveSupport::Concern | |
class CssHelper; end | |
class_methods do | |
def css_helper |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"translatorID":"90ed0f17-6ead-42fe-afb9-d34adb230099", | |
"translatorType":2, | |
"label":"Item URI para cucho", | |
"creator":"jojo", | |
"target":"html", | |
"minVersion":"2.0", | |
"maxVersion":"", | |
"priority":200, | |
"inRepository":false, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ config, lib, pkgs, modulesPath, ... }: | |
{ | |
imports = | |
[ | |
"${fetchTarball "https://github.com/NixOS/nixos-hardware/archive/2a7063461c3751d83869a2a0a8ebc59e34bec5b2.tar.gz" }/raspberry-pi/4" | |
]; | |
boot.kernelPackages = pkgs.linuxPackages_rpi4; | |
boot.kernel.sysctl."vm.swappiness" = 0; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[Unit] | |
After=docker.service docker.socket | |
[email protected] | |
[email protected] | |
[Service] | |
ExecStart=/usr/bin/docker run \ | |
--rm \ | |
--name=traefik \ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# A HashManipulation is a helper object. | |
# The idea is to aid when modifying hashes. | |
# changes = HashManipulation.new | |
# changes.key { |key| key.upcase } | |
# changes.value { |value| value.length } | |
# changes.("children" => [1, 2, 3]) # {"CHILDREN" => 3} | |
module Reports | |
class HashManipulation | |
def initialize | |
@key = -> (obj) { obj } |
NewerOlder