Skip to content

Instantly share code, notes, and snippets.

@ckaminski
ckaminski / how-to-start-android-project.md
Created February 21, 2019 15:58 — forked from bellbind/how-to-start-android-project.md
[doc][android] How to use Android SDK on Windows with cygwin
{ build } master » cmake .. /repos/toyprojects/hunter-cmake-template/build 146
-- The C compiler identification is GNU 5.4.0
-- The CXX compiler identification is GNU 5.4.0
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /usr/bin/c++.exe
SELECT EXTRACT(day FROM(sys_extract_utc(TO_TIMESTAMP_TZ('2016-03-11 13:00:00 -5:00', 'YYYY-MM-DD HH24:MI:SS TZH:TZM')) -
to_timestamp('1970-01-01', 'YYYY-MM-DD'))) * 86400000
+ to_number(to_char(sys_extract_utc(TO_TIMESTAMP_TZ('2016-03-11 13:00:00 -5:00', 'YYYY-MM-DD HH24:MI:SS TZH:TZM')),
'SSSSSFF3')) FROM DUAL
@ckaminski
ckaminski / The Technical Interview Cheat Sheet.md
Last active August 29, 2015 14:28 — forked from tsiege/The Technical Interview Cheat Sheet.md
This is my technical interview cheat sheet. Feel free to fork it or do whatever you want with it. PLEASE let me know if there are any errors or if anything crucial is missing. I will add more links soon.

Studying for a Tech Interview Sucks, so Here's a Cheat Sheet to Help

This list is meant to be a both a quick guide and reference for further research into these topics. It's basically a summary of that comp sci course you never took or forgot about, so there's no way it can cover everything in depth. It also will be available as a gist on Github for everyone to edit and add to.

Data Structure Basics

###Array ####Definition:

  • Stores data elements based on an sequential, most commonly 0 based, index.
  • Based on tuples from set theory.
@ckaminski
ckaminski / SysPropTest.java
Created April 17, 2014 15:24
SysPropTest - demonstrates how long it takes a particular java runtime to iterate through one billion invocations of System.getProperty(). There's possibly some efficiencies in this tight loop, so this is a best case. Authored to test likely impact of a planned Property adapter/facade.
import java.lang.*;
public class SysPropTest {
public static void main(String[] args) {
final String propName = "com.example.test.PropertyName";
long start = System.currentTimeMillis();
for (int i = 0; i < 1000000000; i++ ) {
String val = System.getProperty(propName);
@ckaminski
ckaminski / github-get-gists.groovy
Created April 7, 2014 16:54
Grab a users gists from GitHub
@Grab(group='org.codehaus.groovy.modules.http-builder', module='http-builder', version='0.7')
@Grab(group='oauth.signpost', module='signpost-core', version='1.2.1.2')
@Grab(group='oauth.signpost', module='signpost-commonshttp4', version='1.2.1.2')
import java.io.*
import groovyx.net.http.*
import groovyx.net.http.RESTClient
import groovy.json.JsonSlurper
import static groovyx.net.http.Method.*
import static groovyx.net.http.ContentType.*
@ckaminski
ckaminski / test.lua
Created September 14, 2012 03:31
Test
print("hello world")
@ckaminski
ckaminski / gist:3318511
Created August 10, 2012 22:04
C++ invoker
Heres a rough idea, how you can use this with any function object:
template<class F>
struct invoker
{
static void start(void * x)
{
(*(reinterpret_cast<F*>(x)))();
delete x;
}
};