Run dot -V
to check the version and if it was installed properly or not.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
frontend server | |
server HTML,CSS and frontend js | |
use ejs to render html | |
Credits: https://gist.github.com/noampc/6a36885dbe75f24056ac7a3c7f50d2b7 | |
*/ | |
import express from "express"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"Cp cpp": { | |
"prefix": "cpp", | |
"body": [ | |
"#include <bits/stdc++.h>", | |
"using namespace std;", | |
"", | |
"#ifdef aahnik", | |
"#include \"dbg.cpp\"", | |
"#else", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <pthread.h> | |
#include <stdatomic.h> | |
#include <stdbool.h> | |
#include <stdio.h> | |
#define MAX 90000 | |
atomic_int count = ATOMIC_VAR_INIT(0); | |
int faltu = 0; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
#include <stdlib.h> | |
int main(int argc, char *argv[]) { | |
FILE *fp; | |
void filecopy(FILE *, FILE *); | |
if (argc == 1) { | |
// no input, so copy stdin | |
filecopy(stdin, stdout); |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def perm(suffix, prefix="") -> None: | |
if len(suffix) == 1: | |
print(prefix + suffix) | |
else: | |
for i, char in enumerate(suffix): | |
perm(suffix[:i] + suffix[i + 1 :], prefix + char) | |
perm("hello") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import os | |
SUFFIX = "S20220010001" # replace with your suffix | |
for item in os.listdir(): | |
fname, ext = item.split(".") | |
if not fname.endswith(SUFFIX): | |
fname += f"_{SUFFIX}" | |
os.rename(item, fname + "." + ext) |
I hereby claim:
- I am aahnik on github.
- I am aahnik (https://keybase.io/aahnik) on keybase.
- I have a public key ASD6gkdBjzzeDitjNKdxB9SEUv5Is-CoLe_C47s-1PG85go
To claim this, I am signing this object:
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apt-get update && apt-get upgrade -y | |
apt install wget curl git zsh -y | |
sh -c "$(wget https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh -O -)" | |
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" | |
apt install python3.9 python3.9-venv python3-pip -y | |
python3.9 -m pip install --upgrade pip | |
sudo update-alternatives --install /usr/bin/python python /usr/bin/python3.9 2 | |
pip install pipx | |
pipx ensurepath | |
pipx install poetry |
NewerOlder