Skip to content

Instantly share code, notes, and snippets.

View tranqy's full-sized avatar

Aaron Junod tranqy

View GitHub Profile
@Schwusch
Schwusch / tiltable_stack.dart
Last active October 29, 2022 12:58
A tiltable stack, an idea originated from 2dimensions
import 'package:flutter/material.dart';
class TiltableStack extends StatefulWidget {
final List<Widget> children;
final Alignment alignment;
const TiltableStack({
Key key,
this.children,
this.alignment = Alignment.center,
// c# companion script
// SpriteUVToShader.cs -------------------------------------------------------------------------------------------------------------------------------- //
// Save you your project, add to your SpriteRenderer gameObject
using UnityEngine;
using System.Collections;
using System.Collections.Generic;
[ExecuteInEditMode]
@LeCoupa
LeCoupa / nodejs-cheatsheet.js
Last active April 19, 2024 01:50
Complete Node.js CheatSheet --> UPDATED VERSION --> https://github.com/LeCoupa/awesome-cheatsheets
/* *******************************************************************************************
* THE UPDATED VERSION IS AVAILABLE AT
* https://github.com/LeCoupa/awesome-cheatsheets
* ******************************************************************************************* */
// 0. Synopsis.
// http://nodejs.org/api/synopsis.html
@randylubin
randylubin / proxyServer
Created July 1, 2012 19:02
Node.js Multi-App Proxy Server with Forwarding
var http = require('http'),
httpProxy = require('http-proxy');
//
// Setup proxy server with forwarding
//
var options = {
router: {
'proxytest.randylubin.com': '127.0.0.1:7200',
'randylubin.com': '127.0.0.1:7200',
@Nitewriter
Nitewriter / MyAppDelegate.m
Created September 30, 2011 13:56
UINavigationController custom navigation bar
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
// Override point for customization after application launch.
// Create a new window and assign directly to provided iVar
_window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]];
// Implementation of new init method
MyCustomNavigationBar *navigationBar = [[MyCustomNavigationBar alloc] initWithFrame:CGRectZero];
UINavigationController *navigationController = [[UINavigationController alloc] initWithCustomNavigationBar:navigationBar];
@henrik
henrik / example.m
Created June 27, 2010 11:48
Locating the keyboard (UIKeyboard) on iOS 4, to e.g. add a custom button.
- (void)someSetupMethod {
[[NSNotificationCenter defaultCenter] addObserver:self
selector:@selector(keyboardWillShow:)
name:UIKeyboardWillShowNotification object:nil];
}
- (void)someTeardownMethod {
[[NSNotificationCenter defaultCenter] removeObserver:self name:UIKeyboardWillShowNotification object:nil];
}