Skip to content

Instantly share code, notes, and snippets.

View Furkanzmc's full-sized avatar
🏣
Working from the office

Furkan Üzümcü Furkanzmc

🏣
Working from the office
View GitHub Profile
@daltondotgd
daltondotgd / VSyncForCocos2dX.cpp
Created August 27, 2014 18:50
To enable VSync for WIN32 in cocos2d-x, modify initWithRect(...) function in CCGLView.cpp, so it contains this code right before 'initGlew();'
...
...
...
#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");
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"
@maxbucknell
maxbucknell / README.md
Last active March 11, 2020 01:22
Somebody hit the lights

Alfred

I have a "lights" workflow in Alfred, that is a little AppleScript

tell application "System Events"
	tell appearance preferences
		set dark mode to not dark mode
	end tell
end tell
@flannerykj
flannerykj / .vimrc
Last active September 29, 2020 21:22
if empty(glob('~/.vim/autoload/plug.vim'))
silent !curl -fLo ~/.vim/autoload/plug.vim --create-dirs
\ https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim
autocmd VimEnter * PlugInstall --sync | source $MYVIMRC
endif
" Plugins here
call plug#begin('~/.vim/plugged')
Plug 'w0rp/ale'
Plug 'keith/swift.vim'
Plug 'vim-airline/vim-airline'
@rmi1974
rmi1974 / regression_search_with_git_bisecting.md
Last active August 5, 2022 14:56
Regression search with Git bisecting #git #commandlinefu #regression #bisect

Regression search with Git bisecting

Git bisecting

Normally you mark commits as good OR bad, and using divide-and-conquer strategy. Eventually you will find the first bad commit in a few passes (even with hundreds of commits).

# 0. Start bisecting process
git bisect start
@hbasria
hbasria / raw_as_qs.py
Created January 29, 2016 14:03 — forked from carymrobbins/raw_as_qs.py
Django - convert RawQuerySet to QuerySet
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
"""
@NoobsArePeople2
NoobsArePeople2 / gist:5121597
Last active November 10, 2023 14:33
Configure media keys on a non-Apple keyboard to control Spotify via AppleScript and USB Overdrive on OSX.

Requirements

  1. USB Overdrive
  2. A non-Apple keyboard with media keys (or keys you want to make "media" keys). For reference, I'm using a Microsoft Sidewinder X4

Set Up

  1. Plug in your keyboard and install USB Overdrive.
  2. Open USB Overdrive. Click into the Settings tab.
  3. Click the dropdown and select "Any Keyboard, Any Application"
@acolyer
acolyer / jessfraz.md
Created November 19, 2017 13:39
Containers, operating systems and other fun things from The Morning Paper
@GuillaumeDua
GuillaumeDua / Concept-based polymorphism in modern Cpp.md
Last active May 4, 2024 09:30
Concept-based polymorphism in modern C++

Concept-based polymorphism in modern C++

Date 05-05-2021 - 10-17-2023
Revision R3
Author Guillaume Dua
Reviewers Loïc Joly, Antoine Morrier