Skip to content

Instantly share code, notes, and snippets.

//UI Changes
net_graph "1"
cl_bob_lower_amt "0"
cl_bobamt_lat "0"
cl_bobamt_vert "0"
hud_scaling "1"
cl_bobcycle "2"
cl_autowepswitch "0"
hud_fastswitch "0"
@stingh711
stingh711 / models.py
Created May 8, 2019 05:58
[django-modesl-utils]
from model_utils.fields import StatusField
from model_utils import Choices
class Article(models.Model):
ANOTHER_CHOICES = Choices('draft', 'published')
# ...
another_field = StatusField(choices_name='ANOTHER_CHOICES')
@stingh711
stingh711 / init.el
Created September 12, 2018 05:49
my emacs configuration
(setq gc-cons-threshold 100000000)
;; Added by Package.el. This must come before configurations of
;; installed packages. Don't delete this line. If you don't want it,
;; just comment it out by adding a semicolon to the start of the line.
;; You may delete these explanatory comments.
(require 'package)
(package-initialize)
(setq package-archives '(("gnu" . "http://elpa.emacs-china.org/gnu/")
("melpa" . "http://elpa.emacs-china.org/melpa/")
@stingh711
stingh711 / test.sql
Created June 26, 2014 03:38
Sql to get home page
SELECT
a.*, c.categoryName as articleCategoryName
FROM
ctms_article a
LEFT JOIN ctms_article b ON a.articleCategoryId = b.articleCategoryId
AND a.lastModified < b.lastModified
LEFT JOIN ctms_article_category c ON a.articleCategoryId = c.articleCategoryId
WHERE
a.state = 1
GROUP BY
@stingh711
stingh711 / .vimrc
Created June 24, 2014 08:19
My vimrc
set nocompatible
filetype off
set rtp+=~/.vim/bundle/vundle
call vundle#begin()
Plugin 'gmarik/vundle'
"Plugin 'ervandew/supertab'
Plugin 'nanotech/jellybeans.vim'
Plugin 'scrooloose/nerdtree'
(ns pdms.core
(:use korma.core
[korma.db :only (defdb)]))
(def db-spec {:subprotocol "postgresql"
:subname "//localhost/pdms"
:user "huleehom"
:password ""})
(defdb db db-spec)
@stingh711
stingh711 / index.html
Created May 6, 2013 13:26
bootstrap sample
<!DOCTYPE html>
<html>
<head>
<title>Index</title>
<link rel="stylesheet" href="./backup.css" type="text/css" media="screen" title="no title" charset="utf-8"/>
<style type="text/css">
</style>
</head>
<body>
<div class="navbar navbar-static-top navbar-inverse">
@stingh711
stingh711 / English.html
Created March 5, 2013 05:46
My English resume
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title></title>
</head>
<body>
<h1>Resume</h1>
<h2>Basic Information</h2>
@stingh711
stingh711 / .Xdefaults
Created December 3, 2012 02:30
Urxvt configuration
Rxvt.background:white
Rxvt.foreground:black
Rxvt.colorBD:yellow
Rxvt.colorUL:green
Rxvt.multichar_encoding:gb2312
Rxvt.scrollBar:Fault
Rxvt.scrollBar_right:True
Rxvt.scrollBar_floating: True
Rxvt.scrollstyle: next
Rxvt.saveLines:10000
@stingh711
stingh711 / receiver.clj
Created September 21, 2012 09:02
A simple UDP server in clojure
(import '(java.net DatagramSocket DatagramPacket))
(def socket (DatagramSocket. 5200))
(def running (atom true))
(def buffer (make-array Byte/TYPE 1024))
(defn parse [packet]
(println (String. (.getData packet) 0 (.getLength packet))))
(defn start-receiver []