Skip to content

Instantly share code, notes, and snippets.

View vikrum's full-sized avatar
🎯
Focusing

vikrum vikrum

🎯
Focusing
View GitHub Profile
# -*- coding: utf-8 -*-
"""
This script will delete all of the tweets in the specified account.
You may need to hit the "more" button on the bottom of your twitter profile
page every now and then as the script runs, this is due to a bug in twitter.
You will need to get a consumer key and consumer secret token to use this
script, you can do so by registering a twitter application at https://dev.twitter.com/apps
@requirements: Python 2.5+, Tweepy (http://pypi.python.org/pypi/tweepy/1.7.1)
a4b
accessanalyzer
acm
acm-pca
alexaforbusiness
amplify
api
apigateway
apigatewaymanagementapi
apigatewayv2
"query": {
"bool": {
"must": [
{
"range": {
"@timestamp": {
"gte": "now/m-1m",
"lt": "now/m"
}
}
@vikrum
vikrum / oss-business-models.md
Last active March 29, 2021 21:20
Open Source/Open Core business model blog posts 2013-2020
@vikrum
vikrum / firedns.js
Created January 14, 2013 18:56
A custom DNS server in NodeJS that saves off queries to Firebase so they can be retrieved later. Accompanying blog post: http://5f5.org/ruminations/dns-debugging-over-http.html
var crypto = require('crypto');
var dns = require('native-dns');
var rest = require('restler');
var server = dns.createServer();
server.on('request', function (request, response) {
var domain = request.question[0].name;
if(domain == 'webutils.flourishworks.com') {
// Don't log this because it can't be uniquely identified and subsequently retrieved
@vikrum
vikrum / README.md
Last active May 28, 2021 20:00
Gold Fig blog code snippets

Gold Fig blog post queries, code snippets, and examples.

@vikrum
vikrum / pun-whisperer.py
Last active May 2, 2023 16:51
If we can't use AI for terrible dad jokes and puns then what's the point?
# Infinite loop, record 30 sec from mic, transcribe, gpt3.5-turbo to tell a terrible dad joke/pun
# brew install portaudio ffmpeg
# pip install -r requirements.txt
import pyaudio
import wave
from pydub import AudioSegment
import openai
import os
# MIT License
#
# Copyright (c) April 2023 Vikrum Nijjar
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
@vikrum
vikrum / ping.11.sh
Last active September 1, 2023 17:00
ping.11.sh
#!/bin/bash
# <xbar.title>ping</xbar.title>
# <xbar.version>v1.1</xbar.version>
# <xbar.author>Trung Đinh Quang, Grant Sherrick and Kent Karlsson</xbar.author>
# <xbar.author.github>thealmightygrant</xbar.author.github>
# <xbar.desc>Sends pings to a range of sites to determine network latency</xbar.desc>
# <xbar.image>http://i.imgur.com/lk3iGat.png?1</xbar.image>
# <xbar.dependencies>ping</xbar.dependencies>
@vikrum
vikrum / .osx
Last active December 14, 2023 00:48
Vikrum's Most Excellent Antiques, Curiosities, and Dotfiles
defaults write com.apple.Safari IncludeDebugMenu 1
defaults write com.apple.dock no-bouncing -bool TRUE
defaults write com.apple.notificationcenterui bannerTime 1
defaults write -g ApplePressAndHoldEnabled -bool false
defaults write com.apple.Dock autohide-delay -float 0
defaults write com.apple.dock autohide-time-modifier -float 0.01
killall Dock