Skip to content

Instantly share code, notes, and snippets.

View ChillarAnand's full-sized avatar

Chillar Anand ChillarAnand

View GitHub Profile
@ChillarAnand
ChillarAnand / station.json
Created August 4, 2023 10:14
Charging station data
[
{
"id": 1,
"name": "HSR",
"batteries": 3,
"contact": "87363733"
}
]
@ChillarAnand
ChillarAnand / client.py
Last active September 10, 2020 12:56
Cross platform bluetooth terminal with Python serial asyncio - Blog: https://avilpage.com/2020/08/bluetooth-terminal-python-asyncio.html
import sys
import asyncio
import datetime as dt
import serial_asyncio
import aioconsole
async def echo(writer):
stdin, stdout = await aioconsole.get_standard_streams()
apiVersion: v1
kind: Service
metadata:
name: hello-kubernetes-first
spec:
type: ClusterIP
ports:
- port: 80
targetPort: 8080
selector:
drop database sandbox;
create database sandbox;
\c sandbox;
create table author (
id serial primary key not null,
created_at timestamp with time zone not null,
@ChillarAnand
ChillarAnand / s3.py
Created July 28, 2019 13:08
s3-versioning
import boto3
bucket_name = 'avilpage'
s3 = boto3.resource('s3')
versioning = s3.BucketVersioning(bucket_name)
# check status
print(versioning.status)
# enable versioning
versioning.enable()
# disable versioning
versioning.suspend()
$ host -a aptible.com
Trying "aptible.com"
Trying "aptible.com"
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 8399
;; flags: qr rd ra; QUERY: 1, ANSWER: 17, AUTHORITY: 0, ADDITIONAL: 0
;; QUESTION SECTION:
;aptible.com. IN ANY
;; ANSWER SECTION:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Label</key>
<key>com.apple.mDNSResponder.reloaded</key>
<key>InitGroups</key>
<false/>
<key>UserName</key>
<string>_mdnsresponder</string>
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<!-- This file was created with the aha Ansi HTML Adapter. http://ziz.delphigl.com/tool_aha.php -->
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="application/xml+xhtml; charset=UTF-8" />
<title>stdin</title>
</head>
<body style="color:white; background-color:black">
<pre>
year questions answers
---- --------- -------
2008 58903 221891
2009 345934 957882
2010 703073 1482175
2011 1213325 2295104
2012 1664439 2856400
2013 2076711 3357122
2014 2179821 3238804
2015 2409834 3196377
This file has been truncated, but you can view the full file.
GNU Make 3.81
Copyright (C) 2006 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.
There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE.
This program built for x86_64-pc-linux-gnu
Reading makefiles...
Reading makefile `Makefile'...
Reading makefile `src/.deps/libuv_la-fs-poll.Plo' (search path) (no ~ expansion)...