Favourite talks from /dev/world/2016
https://www.youtube.com/watch?v=4sQzr6zPJkY
Great tips, very concrete, not just ideas.
class LDAPBackend: | |
""" | |
Authenticate against a user on an LDAP server. | |
""" | |
def authenticate(self, username, password): | |
try: | |
import ldap | |
ldapo = ldap.initialize(settings.LDAP_URI) | |
ldapo.set_option(ldap.OPT_PROTOCOL_VERSION, 3) |
Index: include/feedcreator.class.php | |
=================================================================== | |
--- include/feedcreator.class.php (revision 635) | |
+++ include/feedcreator.class.php (working copy) | |
@@ -325,6 +325,7 @@ |
Index: include/feedcreator.class.php | |
=================================================================== | |
--- include/feedcreator.class.php (revision 635) | |
+++ include/feedcreator.class.php (working copy) | |
@@ -325,6 +325,7 @@ |
set nocompatible | |
" load plugins if they are available | |
let s:myvimrc = expand("~/myenv/vim_local/vimrc") | |
let s:hasplugins = filereadable(s:myvimrc) | |
if s:hasplugins | |
set runtimepath=~/myenv/vim_local,$VIMRUNTIME | |
filetype on | |
filetype off |
#!/bin/bash | |
IFS=$'\n' | |
OS=$(uname) | |
[ -z "$VISRVNAME" ] && VISRVNAME="ko" | |
[ -f "$MBE/vim/vimrc" ] && VIMPARAMS=-u "$MBE/vim/vimrc" | |
if [ "$OS" == "Darwin" ]; then | |
if [ -h /Applications/MacVim.app ] || [ -d ~/Applications/MacVim.app ] ; then | |
if [ "$1" == "--printvimbin" ]; then | |
echo mvim |
set nocompatible | |
" load plugins if they are available | |
let s:myvimrc = expand($MBE . "/vim/vimrc") | |
let s:hasplugins = filereadable(s:myvimrc) | |
if s:hasplugins | |
filetype on | |
filetype off | |
set rtp+=$MBE . "/vim/bundle/vundle" |
#!/usr/bin/python | |
# use it with https://github.com/matryer/bitbar | |
import os | |
import re | |
import subprocess | |
import tempfile | |
import time | |
import urllib2 | |
TW_URL = 'https://twitter.com/PrimitivePic' |
Favourite talks from /dev/world/2016
https://www.youtube.com/watch?v=4sQzr6zPJkY
Great tips, very concrete, not just ideas.
#!/usr/bin/env python | |
from __future__ import print_function | |
import json | |
import os | |
import shutil | |
import sys | |
import subprocess | |
import urllib2 |
#!/usr/bin/env python | |
import json | |
import sys | |
import re | |
import subprocess | |
incdirs = set() | |
with open("compile_commands.json") as fp: |