Skip to content

Instantly share code, notes, and snippets.

class Foo {
this() // <- this methid ctags doesn't parse.
{
// do something.
}
}
#!/usr/bin/python2
# -*- coding: utf-8 -*-
import SimpleHTTPServer
import SocketServer
import signal
import sys
import urllib2
import gzip
import zlib
import webbrowser
['$HOME/.vim/plugged/jedi-vim',
'$HOME/Develop/test-python/.venv/lib/python2.7/site-packages',
'/usr/lib/python27.zip',
'/usr/lib/python2.7',
'/usr/lib/python2.7/plat-linux2',
'/usr/lib/python2.7/lib-tk',
'/usr/lib/python2.7/lib-old',
'/usr/lib/python2.7/lib-dynload',
'/usr/lib/python2.7/site-packages',
'/usr/lib/python2.7/site-packages/gtk-2.0',
VIM - Vi IMproved 7.4 (2013 Aug 10, compiled Jun 9 2016 09:35:51)
+acl +farsi +mouse_netterm +tag_binary
+arabic +file_in_path +mouse_sgr +tag_old_static
+autocmd +find_in_path -mouse_sysmouse -tag_any_white
+balloon_eval +float +mouse_urxvt +tcl/dyn
+browse +folding +mouse_xterm +termguicolors
++builtin_terms -footer +multi_byte +terminfo
+byte_offset +fork() +multi_lang +termresponse
+channel +gettext -mzscheme +textobjects
+cindent -hangul_input +netbeans_intg +timers
$HOME/.vim/plugged/jedi-vim
/usr/lib/python35.zip
/usr/lib/python3.5
/usr/lib/python3.5/plat-linux
/usr/lib/python3.5/lib-dynload
/usr/lib/python3.5/site-packages
_vim_path_
$HOME/.vim/plugged/vim-virtualenv/autoload
@ANtlord
ANtlord / dcd-callstack.gdb
Created October 29, 2016 17:54
Callstack to insertion information about implicilty defined identifier
#0 containers.unrolledlist.UnrolledList!(dsymbol.string_interning.InternedString, std.experimental.allocator.mallocator.Mallocator, true, 64uL).UnrolledList.insertBack(dsymbol.string_interning.InternedString) (this=..., item=...) at ../../.dub/packages/emsi_containers-0.5.2/emsi_containers/src/containers/unrolledlist.d:88
#1 0x00000000008ee3bd in dsymbol.conversion.first.InitializerVisitor.visit(const(dparse.ast.PrimaryExpression)) (this=0x7fffffffc3f0, primary=0x1e24400)
at ../../.dub/packages/dsymbol-0.2.0-beta.1/dsymbol/src/dsymbol/conversion/first.d:1179
#2 0x0000000000929517 in dparse.ast.UnaryExpression.accept(dparse.ast.ASTVisitor) const (this=0x1e242f0, visitor=0x7fffffffc3f0)
at ../../.dub/packages/libdparse-0.7.0-beta.1/libdparse/src/dparse/ast.d-mixin-3193:3193
#3 0x00000000008ee798 in dsymbol.conversion.first.InitializerVisitor.visit(const(dparse.ast.ExpressionNode)) (this=0x7fffffffc3f0, expression=0x1e242f0)
at ../../.dub/packages/dsymbol-0.2.0-beta.1/dsymbol/src/dsymbol/conversi
class AnotherModel(models.Model)
#...
class MyModel(MPTTModel):
parent = TreeForeignKey('self', null=True, blank=True, db_index=True, related_name='children')
shifted_finish_date_from = TreeForeignKey(
AnotherModel, related_name='another_children', null=True, blank=True, db_index=True
)
@ANtlord
ANtlord / sh
Created October 12, 2017 12:20
#!/bin/bash
#COMMAND='/usr/local/bin/flake8 --config=/etc/flake8/.flake8'
COMMAND='/home/antlord/.pyenv/shims/python -m flake8 --config=/media/storage/develop/h4r-platform/.flake8'
TEMPDIR=`mktemp -d`
while read oldrev newrev refname; do
files=`git diff --name-only ${oldrev} ${newrev}`
for file in ${files}; do
object=`git ls-tree --full-name -r ${newrev} | egrep "(\s)${file}\$" | awk '{ print $3 }'`
[Version]
version=7.51 Build 020
; environment for both 32/64 bit
[Environment]
DFLAGS="-I%@P%\..\..\src\phobos" "-I%@P%\..\..\src\druntime\import"
; optlink only reads from the Environment section so we need this redundancy
; from the Environment32 section (bugzilla 11302)
import std.stdio;
void main() {
int* a = new int(1);
a.writeln;
size_t.sizeof.writeln;
}