Skip to content

Instantly share code, notes, and snippets.

View mactive's full-sized avatar
🎯
Focusing

mactive mactive

🎯
Focusing
View GitHub Profile
@cgbystrom
cgbystrom / node.js vs Python
Created December 1, 2010 20:56
node.js vs Python with Greenlets
/*
node.js vs Python with Greenlets (say gevent)
I don't get why node.js is being so hyped.
Sure, the idea of writing things in JavaScript both on the client and server-side is really nice.
And JavaScript really fit an event-driven environment with its browser heritage.
But why on earth is boomerang code so appealing to write? I don't get. Am I missing something obvious?
All examples of node.js I see are littered with callbacks yet Ryan Dahl thinks coroutines suck. It doesn't add up for me.
@sekati
sekati / xcode-build-bump.sh
Created July 24, 2012 20:44
Xcode Auto-increment Build & Version Numbers
# xcode-build-bump.sh
# @desc Auto-increment the build number every time the project is run.
# @usage
# 1. Select: your Target in Xcode
# 2. Select: Build Phases Tab
# 3. Select: Add Build Phase -> Add Run Script
# 4. Paste code below in to new "Run Script" section
# 5. Drag the "Run Script" below "Link Binaries With Libraries"
# 6. Insure that your starting build number is set to a whole integer and not a float (e.g. 1, not 1.0)
@asdsasd555
asdsasd555 / css
Created August 6, 2012 01:41
html file
/* upload-popup */
.upload-popup-all {position: absolute;width:281px;padding: 10px;border:1px solid #959ba5;background-color: #eef0f3;}
.upload-popup-all .describe {float:left;font-size:13px;line-height:123%;color:rgb(101,101,101);text-shadow:0px 1px 0px rgba(255,255,255,0.5);}
.upload-popup-all .details {float: right; color: #3e9de3;text-decoration: underline;}
.upload-popup-all .schedule {height: 14px;width:280px;margin-top: 3px;position: relative;background:url(../images/upload-fffbg.png) no-repeat;/*overflow:hidden;*/}
.upload-popup-all .schedule-bg {height: 11px;width:100%;position: absolute;bottom:1px;border:1px solid #3e9de3;background-color: #6dbef2;}
.upload-popup-all .schedule-com-bg {height: 11px;width:100%;position: absolute;border:1px solid #70b05c;background-color: #ace17d;}
.upload-popup-all ul {max-height:131px;margin-top: 15px;margin-bottom: 10px;border: 1px solid #b2b9bd;overflow: auto;}
.upload-popup-all li:last-child {margin-bottom: 0;}
.upload-popup-list {height:25px;width:100px; text-ind
@Mithrandir0x
Mithrandir0x / gist:3639232
Created September 5, 2012 16:15
Difference between Service, Factory and Provider in AngularJS
// Source: https://groups.google.com/forum/#!topic/angular/hVrkvaHGOfc
// jsFiddle: http://jsfiddle.net/pkozlowski_opensource/PxdSP/14/
// author: Pawel Kozlowski
var myApp = angular.module('myApp', []);
//service style, probably the simplest one
myApp.service('helloWorldFromService', function() {
this.sayHello = function() {
return "Hello, World!"
@lexrus
lexrus / HD.txt
Last active July 20, 2023 08:11
All WWDC 2013 Session Videos URLs in https://developer.apple.com/wwdc/videos/ dumped with Chrome. You can download these videos **without** a Apple developer account by running the download.sh script. There is also a sample code downloader here: https://github.com/jfahrenkrug/WWDC-Downloader
http://devstreaming.apple.com/videos/wwdc/2013/710xfx3xn8197k4i9s2rvyb/710/710-HD.mov?dl=1
http://devstreaming.apple.com/videos/wwdc/2013/202xdx2x47ezp1wein/202/202-HD.mov?dl=1
http://devstreaming.apple.com/videos/wwdc/2013/200xdx2x35e1pxiinm/200/200-HD.mov?dl=1
http://devstreaming.apple.com/videos/wwdc/2013/413xdx5x97itb5ek4yex3r7/413/413-HD.mov?dl=1
http://devstreaming.apple.com/videos/wwdc/2013/612xax4xx65z1ervy5np1qb/612/612-HD.mov?dl=1
http://devstreaming.apple.com/videos/wwdc/2013/221xex4xxohbllf4hblyngt/221/221-HD.mov?dl=1
http://devstreaming.apple.com/videos/wwdc/2013/220xbx4xipaxfd1tggxuoib/220/220-HD.mov?dl=1
http://devstreaming.apple.com/videos/wwdc/2013/711xcx4x8yuutk8sady6t9f/711/711-HD.mov?dl=1
http://devstreaming.apple.com/videos/wwdc/2013/404xbx2xvp1eaaqonr8zokm/404/404-HD.mov?dl=1
http://devstreaming.apple.com/videos/wwdc/2013/505xbx4xrgmhwby4oiwkrpp/505/505-HD.mov?dl=1
@tangqiaoboy
tangqiaoboy / UIView+frameAdjust.h
Last active March 25, 2020 04:18
Adjust UIView frame category
//
// UIView+frameAdjust.h
// fenbi
//
// Created by Tang Qiao on 12-5-31.
// Copyright (c) 2012年 Fenbi.com . All rights reserved.
//
#import <Foundation/Foundation.h>
@raven
raven / Breakpoints_v2.xcbkptlist
Last active August 30, 2019 00:53
Symbolic breakpoint for dynamically linking libReveal against UIApplicationMain
<?xml version="1.0" encoding="UTF-8"?>
<Bucket
type = "2"
version = "2.0">
<Breakpoints>
<BreakpointProxy
BreakpointExtensionID = "Xcode.Breakpoint.SymbolicBreakpoint">
<BreakpointContent
shouldBeEnabled = "Yes"
ignoreCount = "0"
/* Merge sort in C */
#include<stdio.h>
#include<stdlib.h>
// Function to Merge Arrays L and R into A.
// lefCount = number of elements in L
// rightCount = number of elements in R.
void Merge(int *A,int *L,int leftCount,int *R,int rightCount) {
int i,j,k;
http://devstreaming.apple.com/videos/wwdc/2014/403xxksrj0qs8c0/403/403_hd_intermediate_swift.mov?dl=1
http://devstreaming.apple.com/videos/wwdc/2014/419xxli6f60a6bs/419/419_hd_advanced_graphics_and_animation_performance.mov?dl=1
http://devstreaming.apple.com/videos/wwdc/2014/101xx36lr6smzjo/101/101_hd.mov?dl=1
http://devstreaming.apple.com/videos/wwdc/2014/236xxwk3fv82sx2/236/236_hd_building_interruptible_and_responsive_interactions.mov?dl=1
http://devstreaming.apple.com/videos/wwdc/2014/306xxjtg7uz13v0/306/306_hd_javascript_for_automation.mov?dl=1
http://devstreaming.apple.com/videos/wwdc/2014/404xxdxsstkaqjb/404/404_hd_advanced_swift.mov?dl=1
http://devstreaming.apple.com/videos/wwdc/2014/701xx8n8ca3aq4j/701/701_hd_designing_accessories_for_ios_and_os_x.mov?dl=1
http://devstreaming.apple.com/videos/wwdc/2014/224xxxlsvigdoc0/224/224_hd_core_os_ios_application_architectural_patterns.mov?dl=1
http://devstreaming.apple.com/videos/wwdc/2014/717xxux5eg6f9v4/717/717_hd_kids_and_apps.mov?dl=1
http://devstreaming.ap
@staltz
staltz / introrx.md
Last active June 13, 2024 19:58
The introduction to Reactive Programming you've been missing