Skip to content

Instantly share code, notes, and snippets.

Warning: owner-based and parent-based contexts differ (values: `undefined` vs `[object Object]`) for key (muiTheme) while mounting Paper (see: http://fb.me/react-context-by-parent)
es6.promise.js:131 Unhandled promise rejection TypeError: Cannot read property 'component' of undefined
at getStyles (webpack:///./~/material-ui/lib/paper.js?:37:47)
at render (webpack:///./~/material-ui/lib/paper.js?:58:23)
at ReactCompositeComponentMixin._renderValidatedComponentWithoutOwnerOrContext (webpack:///./~/react/lib/ReactCompositeComponent.js?:789:34)
at ReactCompositeComponentMixin._renderValidatedComponent (webpack:///./~/react/lib/ReactCompositeComponent.js?:816:14)
at ReactPerf.measure.wrapper (webpack:///./~/react/lib/ReactPerf.js?:70:21)
at ReactCompositeComponentMixin.mountComponent (webpack:///./~/react/lib/ReactCompositeComponent.js?:237:30)
at ReactPerf.measure.wrapper [as mountComponent] (webpack:///./~/react/lib/ReactPerf.js?:70:21)
at Object.ReactReconciler.mountComponent (we
@l4u
l4u / gist:2f0872007626c68470f8
Last active August 29, 2015 14:20
Raspberry Pi 2
# https://wiki.ubuntu.com/ARM/RaspberryPi
# install xubuntu-desktop
# disable overscan
/boot/config.txt
# Autostart Synergy before logging in (LightDM)
/etc/lightdm/lightdm.conf:
[SeatDefaults]
greeter-setup-script=/usr/bin/synergyc <OPTIONS> <SERVER HOSTNAME>
@l4u
l4u / AppDelegate.swift
Last active August 29, 2015 14:18
Facebook-iOS-SDK v4 swift
func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -> Bool {
FBSDKApplicationDelegate.sharedInstance().application(application, didFinishLaunchingWithOptions: launchOptions)
}
func applicationDidBecomeActive(application: UIApplication) {
FBSDKAppEvents.activateApp()
}
func application(application: UIApplication, openURL url: NSURL, sourceApplication: String?, annotation: AnyObject?) -> Bool {
return FBSDKApplicationDelegate.sharedInstance() .application(application, openURL: url, sourceApplication: sourceApplication, annotation: annotation)
@l4u
l4u / gist:bd9381367cad29f28eac
Last active August 29, 2015 14:18
atom.io packages
Tern@0.8.0
atom-beautify@0.23.1
autoclose-html@0.15.0
autocomplete-clang@0.6.2
autocomplete-css@0.6.0
autocomplete-html@0.5.0
autocomplete-paths@1.0.2
autocomplete-plus@2.8.0
autocomplete-snippets@1.2.0
color-picker@1.6.0
@l4u
l4u / gist:33db08ef740a599ee884
Created March 25, 2015 12:28
Save iptables rules
apt-get install iptables-persistent
@l4u
l4u / gist:542ee6439ff2cbeed6ad
Created March 25, 2015 03:26
Parse a number with NBPhoneNumberUtil in Swift
let phoneUtil = NBPhoneNumberUtil()
let phoneNumber = phoneUtil.parse(number.string, defaultRegion:"US", error:nil)
let phoneNumberInString = phoneUtil.format(nbPhoneNumber, numberFormat: NBEPhoneNumberFormatINTERNATIONAL, error: nil)
@l4u
l4u / gist:9440f62bb3ed0bb880a6
Last active January 24, 2023 04:24
Create a UIWindow programmatically without using storyboards in swift
window = UIWindow(frame: UIScreen.mainScreen().bounds)
if let window = window {
window.backgroundColor = UIColor.whiteColor()
window.rootViewController = UIViewController()
window.makeKeyAndVisible()
}
@l4u
l4u / 0_reuse_code.js
Last active August 29, 2015 14:17
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
/home/vagrant/WebChimera/src/ChimeraAPI.cpp: In member function ‘virtual FB::variant JSPlaylistItemsAPI::GetProperty(const string&)’:
/home/vagrant/WebChimera/src/ChimeraAPI.cpp:311:15: error: ‘c’ does not name a type
for( auto c : propertyName ) {
^
/home/vagrant/WebChimera/src/ChimeraAPI.cpp:319:5: error: expected primary-expression before ‘return’
return GetProperty( idx );
^
/home/vagrant/WebChimera/src/ChimeraAPI.cpp:319:5: error: expected ‘;’ before ‘return’
/home/vagrant/WebChimera/src/ChimeraAPI.cpp:319:5: error: expected primary-expression before ‘return’
/home/vagrant/WebChimera/src/ChimeraAPI.cpp:319:5: error: expected ‘)’ before ‘return’
B3C821281A2555E500C617AC /* AVFoundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = B3C821101A25556A00C617AC /* AVFoundation.framework */; };
B3C821291A2555EA00C617AC /* CoreData.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = B3C821121A25556E00C617AC /* CoreData.framework */; };
B3C8212A1A2555EE00C617AC /* CoreLocation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = B3C821141A25557300C617AC /* CoreLocation.framework */; };
B3C8212B1A2555F300C617AC /* CoreText.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = B3C821161A25557A00C617AC /* CoreText.framework */; };
B3C8212C1A2555F800C617AC /* GLKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = B3C821181A25557E00C617AC /* GLKit.framework */; };
B3C8212D1A2555FD00C617AC /* ImageIO.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = B3C8211A1A25558300C617AC /* ImageIO.framework */; };
B3C8212E1A25560400C617AC /* libc++.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = B3C8211C1A25558800C