Skip to content

Instantly share code, notes, and snippets.

Avatar
🏠
Working from home

Furkan Üzümcü Furkanzmc

🏠
Working from home
View GitHub Profile
View .bash_profile
export ANDROID_HOME=/Users/flanneryjefferson/Library/Android/sdk
export PATH=$ANDROID_HOME/tools:$PATH
export PATH=$ANDROID_HOME/platform-tools:$PATH
export PATH=$ANDROID_HOME/build-tools/23.0.1:$PATH
export PATH="$HOME:$PATH:${PATH}:/usr/local/mysql/bin:${PATH}:/usr/bin:/Users/flannerykj/Library/Python/3.6/bin"
# deleted from path: $HOME/.node/bin:/Users/flannerykj/Library/Python/2.7/bin:
export PATH="/usr/local/opt/node@8/bin:$PATH"
export PATH="$HOME:$PATH:${PATH}:/usr/local/mysql/bin:${PATH}:/usr/bin:$HOME/.node/bin"
@hbasria
hbasria / raw_as_qs.py
Created Jan 29, 2016 — forked from carymrobbins/raw_as_qs.py
Django - convert RawQuerySet to QuerySet
View raw_as_qs.py
from django.db import connection, models
class MyManager(Manager):
def raw_as_qs(self, raw_query, params=()):
"""Execute a raw query and return a QuerySet. The first column in the
result set must be the id field for the model.
:type raw_query: str | unicode
:type params: tuple[T] | dict[str | unicode, T]
:rtype: django.db.models.query.QuerySet
"""
@daltondotgd
daltondotgd / VSyncForCocos2dX.cpp
Created Aug 27, 2014
To enable VSync for WIN32 in cocos2d-x, modify initWithRect(...) function in CCGLView.cpp, so it contains this code right before 'initGlew();'
View VSyncForCocos2dX.cpp
...
...
...
#if (CC_TARGET_PLATFORM == CC_PLATFORM_WIN32)
// Turn on vertical screen sync under Windows.
// (I.e. it uses the WGL_EXT_swap_control extension)
typedef BOOL(WINAPI *PFNWGLSWAPINTERVALEXTPROC)(int interval);
PFNWGLSWAPINTERVALEXTPROC wglSwapIntervalEXT = NULL;
wglSwapIntervalEXT = (PFNWGLSWAPINTERVALEXTPROC)wglGetProcAddress("wglSwapIntervalEXT");