Skip to content

Instantly share code, notes, and snippets.

View shripadk's full-sized avatar
🎯
Working

Shripad Krishna shripadk

🎯
Working
View GitHub Profile
@shripadk
shripadk / README.md
Last active March 28, 2024 04:27
Installing DigitalOcean Metrics Agent for Oracle Linux

Just run the following command in your Terminal to install the Agent:

curl -sSL https://gist.githubusercontent.com/shripadk/9d8db539e3d030579b81763549bb1a20/raw/d12a8ac8bd2941f8d02bc28a6ed5a90c22ef1433/install.sh | sudo bash
@shripadk
shripadk / default_config.yaml
Last active November 12, 2023 22:18
accelerate default_config
compute_environment: LOCAL_MACHINE
debug: false
distributed_type: 'NO'
downcast_bf16: 'no'
dynamo_config:
dynamo_backend: TENSORRT
dynamo_mode: max-autotune
dynamo_use_dynamic: false
dynamo_use_fullgraph: false
gpu_ids: all
/**
MIT License
Copyright 2022 Shripad Krishna <i@shripadk.me>
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:
The above copyright notice and this permission notice shall be included in all copies or substantial portions
@shripadk
shripadk / README.md
Last active February 16, 2024 09:55
Karabiner Complex Modification: Change F4 to Command + Space for Alfred

Karabiner — Change F4 to Command + Space for Alfred

This is useful for changing the default F4 key that is bound to Spotlight to launch Alfred in macOS Big Sur.

Setup:

  1. Make sure you have Karabiner installed.
  2. Open ~/.config/karabiner/karabiner.json.
  3. Copy the rules object from below snippet and add it within profiles.complex_modifications. The basic structure of your karabiner.json file should look something like this:
@shripadk
shripadk / override-cybertron.css
Last active March 9, 2021 04:25
Obsidian Cybertron Theme Overrides
/**
* Checkbox modifications:
* -----------------------
* Have added !important only because I am overriding Cybertron.
* You can remove it if you are directly modifying .task-list-item-checkbox.
*/
.markdown-preview-view .task-list-item-checkbox {
top: 2.6px !important;
left: -6.6px !important;
border: 2px solid #fcf601;
@shripadk
shripadk / default.yml
Created March 3, 2021 06:27
espanso configuration file
# espanso configuration file
# This is the default configuration file, change it as you like it
# You can refer to the official documentation:
# https://espanso.org/docs/
# Matches are the substitution rules, when you type the "trigger" string
# it gets replaced by the "replace" string.
matches:
# Simple text replacement
@shripadk
shripadk / MenuServicos.jsx
Created December 10, 2015 17:08 — forked from LuizMoreira/MenuServicos.jsx
[Rubix] - Menu item - I can't load menu item dynamically.
var ReactIntl = require('react-intl');
var IntlMixin = ReactIntl.IntlMixin;
var FormattedNumber = ReactIntl.FormattedNumber;
var MenuServicos = React.createClass({
mixins: [IntlMixin],
render: function() {
var menu = (
@shripadk
shripadk / webpack.js
Created October 20, 2014 22:15
webpack node api
var path = require('path');
var webpack = require('webpack');
var WebPackDevServer = require('webpack-dev-server');
var uglify = new webpack.optimize.UglifyJsPlugin();
var config = [
{
entry: ['./src/main.js'],
output: {
01000000010518d85ccd785c2b8272040e9d8af81525444d039b8970fc02c42475c660e1a400000000d700483045022100cc31a4757fb8c271d904f76a09f49e65699804a4b32879a61cd8cc4cada3078202205e0e1110e6dd066562c190b69c09f6b55dccbb85218e7dbeb87dc04013a81206014c8b5121034ccea3bd0a30e05d9065e4a47683ff86c2b735bc24b5abf682c9421563ea764d21024aa0ff5b42d9e4694b6092183952592f657b71f221120ce522fcdc265038ec6b2102f0a18afb3a68d3329bbee1f154bcf4f29aec0185974ec803ac767a259da764e521020b2af507a116fa025f286004c2704004205a5aff5b4dba99fd08ac24ac300cf254aeffffffff01a0860100000000001976a914d8c446e59afac7863e4698f6d4de9d7a45fbd76988ac00000000
var redis = require('redis');
var client = redis.createClient();
var pullNotifications = function() {
// if notification in list rpop it else block until one is available; timeout=0;
client.brpop('_bitcoin_notifications_', '_bitcoin_notifications_', 0, function(e, data) {
if(!data.length) return;
data = JSON.parse(data[1]);
switch(data.type) {