Skip to content

Instantly share code, notes, and snippets.

package ratelimiter
import (
"errors"
"fmt"
"github.com/gin-gonic/gin"
"github.com/redis/go-redis/v9"
"strconv"
"time"
)
@shhivam
shhivam / redis.conf
Created August 4, 2022 18:05
A redis conf file with `appendonly` set to `yes`
# Redis configuration file example.
#
# Note that in order to read the configuration file, Redis must be
# started with the file path as first argument:
#
# ./redis-server /path/to/redis.conf
# Note on units: when memory size is needed, it is possible to specify
# it in the usual form of 1k 5GB 4M and so forth:
#
var tripetto = TripettoServices.init({ token: "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VyIjoia3U0eDFkU1I0VUZZcDhhdW85S2xxRWlkNlJBMlhxaVBGUit2VjRuZm83Zz0iLCJkZWZpbml0aW9uIjoiUjRuRWlhNjJzUGVubWlnSHpNenZTdkd4V2xyUHdrVnh0b1JYSmtWRjN1Yz0iLCJ0eXBlIjoiY29sbGVjdCJ9.slQfOortPdVKF-hN6VuHOHGdthdaTpui2pp5vobsI3Y" });
console.log("code running");
TripettoAutoscroll.run({
element: document.getElementById("tripetto"),
definition: tripetto.definition,
styles: tripetto.styles,
l10n: tripetto.l10n,
locale: tripetto.locale,
translations: tripetto.translations,
attachments: tripetto.attachments,
@ECHO OFF
set IPADDRESS=x.x.x.x
set INTERVAL=3
:PINGINTERVAL
ping google.com
timeout %INTERVAL%
GOTO PINGINTERVAL
@shhivam
shhivam / insideout.c
Last active January 31, 2018 18:35
Implements the spiral
#include<stdio.h>
int main()
{
int count, n , dir =1, flag = 0, q =1, comparison;
printf("Enter an odd number:");
scanf("%d",&n);
if (n % 2 == 0)
return 1;
int mat[n][n];
int x = ((n+1)/2) - 1, y = x;