Skip to content

Instantly share code, notes, and snippets.

View IndrekV's full-sized avatar
🏠
Working from home

Indrek Vändrik IndrekV

🏠
Working from home
View GitHub Profile
@IndrekV
IndrekV / nsarray.mm
Created February 25, 2014 13:00 — forked from jeremy-w/nsarray.mm
//clang++ -std=c++11 -stdlib=libc++ -framework Foundation nsarray.mm -o nsarray
/* Note:
* - libstdc++ has been frozen by Apple at a pre-C++11 version, so you must opt
for the newer, BSD-licensed libc++
* - Apple clang 4.0 (based on LLVM 3.1svn) does not default to C++11 yet, so
you must explicitly specify this language standard. */
/* @file nsarray.mm
* @author Jeremy W. Sherman
*
* Demonstrates three different approaches to converting a std::vector

Locate the section for your github remote in the .git/config file. It looks like this:

[remote "origin"]
	fetch = +refs/heads/*:refs/remotes/origin/*
	url = git@github.com:joyent/node.git

Now add the line fetch = +refs/pull/*/head:refs/remotes/origin/pr/* to this section. Obviously, change the github url to match your project's URL. It ends up looking like this:

# http://stackoverflow.com/questions/9206013/javascript-fuzzy-search#answer-15252131
String.prototype.fuzzy = (search) ->
return true unless search
str = @toLowerCase()
search = search.toLowerCase()
i = 0
@IndrekV
IndrekV / install_cygwin_sshd.txt
Last active September 3, 2015 09:08 — forked from roxlu/install_cygwin_sshd.txt
Installing CYGWIN + SSHD for remote access through SSH on windows
Installing CYGWIN with SSH
1) Download cygwin setup.exe from http://www.cygwin.com
- Execute setup.exe
- Install from internet
- Root directory: `c:\cygwin` + all users
- Local package directory: use default value
- Select a mirror to download files from
- Select these packages:
- editors > xemacs 21.4.22-1
- net > openssh 6.1-p
@IndrekV
IndrekV / camera.html
Created October 12, 2015 12:52 — forked from dhavaln/camera.html
Phonegap Camera Capture Example
<!DOCTYPE html>
<html>
<head>
<title>Capture Photo</title>
<meta name="viewport" content="width=device-width,height=device-height,initial-scale=1"/>
<script type="text/javascript" charset="utf-8" src="js/phonegap.js"></script>
<script type="text/javascript" charset="utf-8">
var pictureSource; // picture source
var destinationType; // sets the format of returned value
@IndrekV
IndrekV / gist:dcf7f6633c29173db7df5da5758a3cb9
Created September 17, 2016 18:45 — forked from anonymous/gist:478997
isometric calculations
var hitArray:Array = new Array();
//we FIRST move the player, then move the player BACKWARD if there's a collision.
player.sprite.x += player.xVelocity;
player.sprite.y += player.yVelocity;
player.sprite.z += player.zVelocity;
// Here, I do a 3D hit test to see the player is touching any of the objects in the scene.
// Those objects are then tested later to see WHERE they touch.
@IndrekV
IndrekV / Main.hx
Created December 6, 2017 12:45 — forked from jgranick/Main.hx
Basic GameCenter Example
package;
import extension.gamecenter.GameCenter;
import extension.gamecenter.GameCenterEvent;
import flash.display.Sprite;
class Main extends Sprite {
@IndrekV
IndrekV / index.android.js
Created December 20, 2017 07:29 — forked from tackkinc/index.android.js
React Native - Section ListView with search input
/**
* Inspired by "MyASUS - ASUS support" version 2016 https://play.google.com/store/apps/details?id=com.asus.ia.asusapp
* Colors: https://material.google.com/style/color.html#color-color-palette
*
* See online - https://rnplay.org/apps/7qet3A
*/
import React, { Component, } from 'react';
import {
AppRegistry,
@IndrekV
IndrekV / progamatically-popover-example.m
Created February 1, 2018 13:58 — forked from marteinn/progamatically-popover-example.m
NSPopover Example: Create and show a NSPopover programmatically when a user clicks a button in a subview
-(void) buttonClick:(NSButton *)sender {
// Create view controller
EXPopoverViewController *viewController = [[EXPopoverViewController alloc] init];
// Create popover
NSPopover *entryPopover = [[NSPopover alloc] init];
[entryPopover setContentSize:NSMakeSize(200.0, 200.0)];
[entryPopover setBehavior:NSPopoverBehaviorTransient];
[entryPopover setAnimates:YES];
[entryPopover setContentViewController:viewController];
@IndrekV
IndrekV / CompleterWithQSqlTableModel.pro
Created August 6, 2018 14:35 — forked from eyllanesc/CompleterWithQSqlTableModel.pro
Example QCompleter with QSqlTableModel
#-------------------------------------------------
#
# Project created by QtCreator 2017-09-17T11:02:01
#
#-------------------------------------------------
QT += core gui
greaterThan(QT_MAJOR_VERSION, 4): QT += widgets sql