Skip to content

Instantly share code, notes, and snippets.

(ns your-app.app
(:require
[matchbox.core :as m]
[rum.core :as rum]))
(enable-console-print!)
(def root (m/connect "https://student-realestate.firebaseio.com"))
(m/auth-anon root)
@HungHuynh
HungHuynh / boost.sh
Created March 26, 2014 01:21 — forked from rsobik/boost.sh
#===============================================================================
# Filename: boost.sh
# Author: Pete Goodliffe
# Copyright: (c) Copyright 2009 Pete Goodliffe
# Licence: Please feel free to use this, with attribution
# Modified version
#===============================================================================
#
# Builds a Boost framework for the iPhone.
# Creates a set of universal libraries that can be used on an iPhone and in the
#!/bin/sh
### BEGIN INIT INFO
# Provides: btsync
# Required-Start: $local_fs $remote_fs
# Required-Stop: $local_fs $remote_fs
# Should-Start: $network
# Should-Stop: $network
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: Multi-user daemonized version of btsync.
//Check link RSS
// _strURL = @"http://tuoitre.vn/Pages/RssFeeds.aspx?ChannelID=6";
NSURL *feedURL = [NSURL URLWithString:_strURL];
MWFeedParser *feedParser = [[MWFeedParser alloc] initWithFeedURL:feedURL];
feedParser.delegate = self;
feedParser.feedParseType = ParseTypeItemsOnly; // Parse feed info and all items
feedParser.connectionType = ConnectionTypeAsynchronously;
[feedParser parse];
#pragma mark - Service POST with path + Params + name + Data
-(void)requestPostWithUrl:(NSString*)path
WitParameter:(NSDictionary*)params
WithName:(NSString*)name
WithData:(id)data
{
NSURL *url = [NSURL URLWithString:URL_SERVCE_ASSOCIATION];
AFHTTPClient *httpClient = [[AFHTTPClient alloc] initWithBaseURL:url];
@HungHuynh
HungHuynh / gist:5418167
Last active December 16, 2015 10:09
Youtube Trailer
"<html><head><meta name = \"viewport\" content = \"initial-scale = 1.0, user-scalable = no, width = 212\"/></head><body style='background-color: #A000;margin-top:0px;margin-left:0px'><div><param name=\"movie\" value=\"%@\"></param><param name=\"wmode\" value=\"transparent\"></param><embed src=\"%@\" type=\"application/x-shockwave-flash\" wmode=\"transparent\" width=\"%0.0f\" height=\"%0.0f\"></embed></object></div></body></html>",stringURL,stringURL,width,height];
link youtube : https://www.youtube.com/watch?v=dz3Rpn-wRqE
id video : dz3Rpn-wRqE
=> stringURL = http://www.youtube.com/v/dz3Rpn-wRqE?version=3&f=videos&app=youtube_gdata
@HungHuynh
HungHuynh / gist:4739131
Created February 8, 2013 13:50
NSDictionary NULL
if ((NSNull *)[user objectForKey:@"myKey"] == [NSNull null]) { }
@HungHuynh
HungHuynh / gist:4592820
Created January 22, 2013 07:43
draw line, circle, triangle
#pragma mark - Draw Oxyz
-(void)drawOxyz:(CGPoint)_pointO withX:(CGPoint)_pointX withY:(CGPoint)_pointY withZ:(CGPoint)_pointZ withColor:(BOOL)isRed{
[self drawLine:CGPointMake(_pointO.x + PADDLE, _pointO.y) with:_pointX withRed:isRed];
[self drawLine:CGPointMake(_pointO.x , _pointO.y - PADDLE) with:_pointY withRed:isRed];
[self drawLine:CGPointMake(_pointO.x + PADDLE/2, _pointO.y - PADDLE/2 ) with:_pointZ withRed:isRed];
}
#pragma mark - Draw Line
@HungHuynh
HungHuynh / main_Queue
Created October 19, 2012 14:39
create main queue
dispatch_async(dispatch_get_main_queue(), ^{
});
@HungHuynh
HungHuynh / gist:3913977
Created October 18, 2012 18:34 — forked from andrewzimmer906/gist:3145581
Post Photo and Message wall with Facebook iOS6 SDK
// Start here https://developers.facebook.com/docs/getting-started/getting-started-with-the-ios-sdk/
// Install the Facebook SDK, get it linked up, create an app, and get that setup correctly
// in your info.plist, appDelegate, and build settings.
//Note: This example uses ARC. If you aren't using ARC, made sure to release/retain objects as needed.
//Now for the fun part.
////////////////////////////