Skip to content

Instantly share code, notes, and snippets.

View Delta456's full-sized avatar
:octocat:
Back to Coding

Swastik Baranwal Delta456

:octocat:
Back to Coding
View GitHub Profile
@Delta456
Delta456 / canvas.css
Created August 1, 2019 15:02
Brick Beaker
canvas { background: #eee; }
@Delta456
Delta456 / mark.md
Created January 7, 2020 07:53
A href markdown for Mineswepper
@Delta456
Delta456 / link.txt
Created April 12, 2020 15:56
my golang link
@Delta456
Delta456 / is_13.v
Last active May 4, 2020 07:12
is thirteen module in V
module is_thirteen
import math
import time
import strings
const (
thirteen_strs = [
"xiii", // Roman numeral 13
"1.3", // Basically 13, see proof in https://github.com/jezen/is-thirteen/pull/420
@Delta456
Delta456 / check_cast_type.v
Created October 17, 2020 14:37
check_cast_type
pub fn (mut c Checker) can_type_cast(from table.Type, to table.Type) bool {
from_type_sym := c.table.get_type_symbol(from)
to_type_sym := c.table.get_type_symbol(to)
// check basic types
if c.check_types(from, to) {
return true
}
if to == table.bool_type || to_type_sym.kind == .none_ || from == table.none_type {
return false
}
import os
fn C.execvp(file charptr, argv &charptr) int
fn main() {
final_editor_cmd := os.file_name(os.args[0])[1..]
if os.args.len < 2 {
eprintln('Usage: `v$final_editor_cmd FILE:LINE: ...`')
exit(1)
}
@Delta456
Delta456 / banner.go
Created February 7, 2022 06:19
Twitter Banner
package main
import (
"math"
"strings"
"github.com/Delta456/box-cli-maker/v2"
"github.com/gookit/color"
)
@Delta456
Delta456 / project.py
Created August 15, 2022 11:56
School Python Project
import sys
import pickle
import time
import webbrowser
import pywhatkit
from datetime import datetime
import pyautogui as pg
now = datetime.now()
@Delta456
Delta456 / networking.md
Created October 11, 2023 17:49
HTTP Networking Notes

HTTP

HTTP stands for Hyper Text Protocol

It is one of the most powerful protocol. HTTP is not the only protocol uses URLs.

Protocol

Protocol is a set of rules, and two computers can follow this instructions. It also tells how to parse this information as something useful.

@Delta456
Delta456 / print.v
Last active November 9, 2023 18:35
Python Print in V
import os { flush }
struct Print {
sep string = ' '
end string = '\n'
}
fn (p Print) print(args ...string) {
for i, arg in args {
print(arg)