Skip to content

Instantly share code, notes, and snippets.

import com.fasterxml.jackson.databind.ObjectMapper
import org.jetbrains.exposed.sql.Column
import org.jetbrains.exposed.sql.ColumnType
import org.jetbrains.exposed.sql.Table
import org.postgresql.util.PGobject
import java.sql.PreparedStatement
/**
@wwj718
wwj718 / upload2qiniu.py
Created February 6, 2017 08:05
将网站/目录整体上传到七牛云
#!/usr/bin/env python
# encoding: utf-8
'''使用:python upload2qiniu.py SITE_DIR
'''
import sys,os
from qiniu import Auth, put_file, etag, urlsafe_base64_encode,BucketManager,CdnManager
import qiniu.config
from path import path # 文档参考# https://pythontips.com/2014/01/23/python-101-writing-a-cleanup-script/
@terrydang
terrydang / install_nvidia_driver_in_ubuntu1604.md
Last active August 8, 2022 09:31
Ubuntu 16.04 安装英伟达(Nvidia)显卡驱动

Ubuntu 16.04 安装英伟达(Nvidia)显卡驱动

配有英伟达显卡的主机,装完 Ubuntu 16.04 后出现闪屏现象,是由于没有安装显卡驱动。

显卡型号
NVIDIA Corporation GM204 [GeForce GTX 970]

@bcap
bcap / start-stop-daemon-template
Last active July 21, 2023 11:12
Template file for creating linux services out of executables using the start-stop-daemon
#!/bin/bash
### BEGIN INIT INFO
# Provides: <service name>
# Required-Start: $remote_fs $syslog
# Required-Stop: $remote_fs $syslog
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: <service description>
### END INIT INFO
@narenranjit
narenranjit / VelToJSON
Created January 24, 2012 20:23
Convert objects in Velocity templates to JSON
#macro(VelListToJSON $list )
#set($myList = $list )## dereference
{
#foreach($key in $myList.keySet())
"$key":
#set($x = $myList.get($key))
#VelToJSON($x)
#if($foreachCount != $myList.keySet().size()) , #end
#end
}