Skip to content

Instantly share code, notes, and snippets.

mod helpers;
use std::env;
use std::str;
use std::thread;
use std::cmp::min;
use std::convert::TryInto;
use std::time::Duration;
use std::io::{Read, Write};
use std::fs::{File, OpenOptions, remove_file, create_dir};
{
"languageserver": {
"Hoon": {
"command": "/home/clone/urbit/hoon-language-server/bin/index.js",
"args": [
"-p",
"8080",
"-s",
"zod",
"-c",
execute pathogen#infect()
set nocompatible
" allow backspacing over everything in insert mode
set backspace=indent,eol,start
"Basic settings
set nobackup " do not keep a backup file, use versions instead
set nowritebackup
set ruler " show the cursor position all the time
{
"keymaps": {
"0": { "type": "scroll.home" },
":": { "type": "command.show" },
"k": { "type": "command.show.open", "alter": false },
"K": { "type": "command.show.open", "alter": true },
"t": { "type": "command.show.tabopen", "alter": false },
"T": { "type": "command.show.tabopen", "alter": true },
"w": { "type": "command.show.winopen", "alter": false },
"W": { "type": "command.show.winopen", "alter": true },
#include <stdio.h>
#include <string.h>
#include <crypt.h>
#define MAX_LEN 5
void inc(char pass[], int i);
int check_pass(char pass[], char salt[], char hash[]);
int main(int argc, char *argv[])
set nocompatible
" allow backspacing over everything in insert mode
set backspace=indent,eol,start
"Basic settings
set nobackup " do not keep a backup file, use versions instead
set ruler " show the cursor position all the time
set showcmd " display incomplete commands
set hlsearch "highlight search results when using / or ?
def analyze(x):
board=[list(x[0:3]),list(x[3:6]),list(x[6:9])]
for i in range(3):
if all(j[i] == "X" for j in board) or all(board[i][j] == "X" for j in range(3)):
return "X"
if all(j[i] == "O" for j in board) or all(board[i][j] == "O" for j in range(3)):
return "O"
#Check diagnals
if board[0][0] == board[1][1] == board[2][2] or board[0][2] == board[1][1] == board[2][0]:
if board[1][1] != "#":