Skip to content

Instantly share code, notes, and snippets.

View Gamezpedia's full-sized avatar

InityDev Gamezpedia

View GitHub Profile
fun main(args: Array<String>) {
println("a" to "b")
println("a" to "b" tre "c")
println("a" to "b" tre "c" fo "d")
println("a" to "b" tre "c" fo "d" fi "e")
println("a" to "b" tre "c" fo "d" fi "e" sik "f")
println("a" to "b" tre "c" fo "d" fi "e" sik "f" seva "g")
}
infix fun <A, B, C> Pair<A, B>.tre(c: C) = Triple(first, second, c)
@kitze
kitze / conditionalwrap.js
Created October 25, 2017 16:54
one-line React component for conditionally wrapping children
import React from 'react';
const ConditionalWrap = ({condition, wrap, children}) => condition ? wrap(children) : children;
const Header = ({shouldLinkToHome}) => (
<div>
<ConditionalWrap
condition={shouldLinkToHome}
wrap={children => <a href="/">{children}</a>}
>
@prime31
prime31 / gist:5675017
Last active April 2, 2024 03:55
Simple PHP script showing how to send an Android push notification. Be sure to replace the API_ACCESS_KEY with a proper one from the Google API's Console page. To use the script, just call scriptName.php?id=THE_DEVICE_REGISTRATION_ID
<?php
// API access key from Google API's Console
define( 'API_ACCESS_KEY', 'YOUR-API-ACCESS-KEY-GOES-HERE' );
$registrationIds = array( $_GET['id'] );
// prep the bundle
$msg = array
@thanksmister
thanksmister / AndroidScroll.as
Created October 18, 2010 17:47
The is an AS3 list that works for both Android and iOS devices. It responds to touch scrolling and touch selection of individual list items. You can use this within Flex Builder or CS5 Flash Professional Android/iPhone project.
/**
* @author Michael Ritchie
* @blog http://www.thanksmister.com
* @twitter Thanksmister
* Copyright (c) 2010
*
* This is a AS3 application to test the TouchList component.
* */
package
{