Skip to content

Instantly share code, notes, and snippets.

View voldyman's full-sized avatar

Akshay Shekher voldyman

View GitHub Profile
# Privacy Policy
Thank you for reading our Privacy Policy. This page explains what information **Chalak** collects, why we collect it, and how you can request your data to be removed.
## 1. Data We Collect
**[Bot Name]** may collect basic Discord information needed for the bot to work, such as:
- Server ID
- User ID
TERMS OF SERVICE AGREEMENT
This Terms of Service Agreement (the "Agreement") is entered into between [Akshay Shekher] ("Bot Owner") and the user ("User") of the [Bot Name] Discord bot (the "Bot").
By using the Bot, the User agrees to be bound by the terms of this Agreement. If the User does not agree to the terms of this Agreement, they should immediately discontinue use of the Bot.
1. Use of the Bot: The Bot Owner grants the User a non-exclusive, non-transferable, limited license to use the Bot for personal or non-commercial purposes.
2. Prohibited Use: The User may not use the Bot in any way that violates applicable laws, rules, or regulations or infringes upon the rights of any third party. The User may not use the Bot for any commercial purposes without the express written consent of the Bot Owner.
3. Limitation of Liability: The Bot Owner shall not be liable for any damages arising out of the use or inability to use the Bot, including but not limited to, damages for loss of profits, loss of data, or o
@voldyman
voldyman / main.go
Created March 28, 2020 18:01
TUI for searcher
package main
import (
"fmt"
"log"
"github.com/marcusolsson/tui-go"
)
func main() {
diff --git a/sshd/net.go b/sshd/net.go
index 8305696..154ec45 100644
--- a/sshd/net.go
+++ b/sshd/net.go
@@ -2,6 +2,7 @@ package sshd
import (
"net"
+ "time"
#include <stdlib.h>
#include <unistd.h>
#include <stdio.h>
#include <string.h>
#include <sys/timerfd.h>
typedef struct TimeEvent {
int fd;
char* message;
struct timespec added_time;
╭─voldyman@arc.local ~/dev/nothing ‹master*›
╰─➤ scc .
───────────────────────────────────────────────────────────────────────────────
Language Files Lines Code Comments Blanks Complexity
───────────────────────────────────────────────────────────────────────────────
C Header 67 2334 1738 23 573 44
C 65 11394 9278 77 2039 1292
Lisp 8 30 24 0 6 0
Plain Text 5 140 132 0 8 0
Markdown 5 264 194 0 70 0
@voldyman
voldyman / healthkit-data-to-csv.go
Created April 26, 2019 03:29
This program takes the XML file from iPhone's Health app (Health -> User -> Export data) and converts it into a CSV file with max, min, avg, p75 & p90 heart rate.
package main
import (
"encoding/csv"
"encoding/xml"
"flag"
"fmt"
"io/ioutil"
"os"
"sort"
use std::io;
use std::env;
use std::fs::{self, DirEntry};
use std::path::Path;
fn visit_dirs(dir: &Path, cb: &Fn(&DirEntry)) -> io::Result<()> {
if dir.is_dir() {
for entry in fs::read_dir(dir)? {
let entry = entry?;
let path = entry.path();
#include <dirent.h>
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <errno.h>
#include <stdbool.h>
static
bool startswith(const char* str, const char* prefix) {
if ((str == NULL) || (prefix == NULL)) {
╭─voldyman@arc.local ~/dev/nothing ‹master*›
╰─➤ cloc . 2 ↵
167 text files.
161 unique files.
22 files ignored.
github.com/AlDanial/cloc v 1.80 T=0.37 s (392.4 files/s, 38714.8 lines/s)
-------------------------------------------------------------------------------
Language files blank comment code
-------------------------------------------------------------------------------