Skip to content

Instantly share code, notes, and snippets.

package main
import (
"io"
"log"
"os"
"os/exec"
"io/ioutil"
"bytes"
)
@xavierskip
xavierskip / snake.py
Last active February 24, 2023 12:21
snake in terminal
#!/usr/bin/env python
# -*- coding:utf-8 -*-
import curses
from curses import KEY_RIGHT, KEY_LEFT, KEY_UP, KEY_DOWN
import time
import random
class Snake():
def __init__(self,length,screen):
# left top coordinate (y,x)
@Maras0830
Maras0830 / project.dev.conf
Created March 15, 2017 09:33
[nginx] same domain map to different project. [Vuex(vue-route) + Laravel]
server {
listen 80;
listen [::]:80;
server_name test.dev;
root /var/www/project1/public;
index index.php index.html index.htm;
location / {
try_files $uri $uri/ /index.php$is_args$args;