This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| export class HttpClient { | |
| constructor(defaults) { | |
| this.defaults = defaults; | |
| this.interceptors = []; | |
| this.activeRequestCount = 0; | |
| this.isRequesting = false; | |
| } | |
| addInterceptor(interceptor) { | |
| this.interceptors.push(interceptor); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # dump | |
| mysqldump -u user -p database --default-character-set=utf8mb4 --result-file=dump.sql | |
| # restore | |
| mysql -u user -p database < dump.sql |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| --[[ | |
| The MIT License (MIT) | |
| Copyright (c) 2015 Jakub (Kubuxu) Sztandera | |
| Permission is hereby granted, free of charge, to any person obtaining a copy | |
| of this software and associated documentation files (the "Software"), to deal | |
| in the Software without restriction, including without limitation the rights | |
| to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
| copies of the Software, and to permit persons to whom the Software is |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE | |
| Version 2, December 2004 | |
| Copyright (C) 2015 Fedia <fedia@psih.ru> | |
| Everyone is permitted to copy and distribute verbatim or modified | |
| copies of this license document, and changing it is allowed as long | |
| as the name is changed. | |
| DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| FROM ubuntu | |
| RUN apt-get update | |
| RUN apt-get install -y socat | |
| VOLUME /foo | |
| CMD socat UNIX-LISTEN:/foo/bar.sock - |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| local ResourcesData = require("data.ResourcesData") | |
| local scheduler = require("framework.scheduler") | |
| local Bing_ganPhysics = require("data.bing_ganQuick") | |
| local ChipmunkTestScene = class("ChipmunkTestScene", function() | |
| return display.newScene("ChipmunkTestScene") | |
| end) | |
| local GRAVITY = -200 | |
| local COIN_MASS = 100 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| http://www.umeng.com/test_devices | |
| 获取deviceid | |
| 加入以下权限 | |
| <uses-permission android:name="android.permission.ACCESS_WIFI_STATE"></uses-permission> | |
| <uses-permission android:name="android.permission.CHANGE_WIFI_STATE"></uses-permission> | |
| <uses-permission android:name="android.permission.WAKE_LOCK"></uses-permission> | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| NOTE: Easier way is the X86 way, described on https://www.genymotion.com/help/desktop/faq/#google-play-services | |
| Download the following ZIPs: | |
| ARM Translation Installer v1.1 (http://www.mirrorcreator.com/files/0ZIO8PME/Genymotion-ARM-Translation_v1.1.zip_links) | |
| Download the correct GApps for your Android version: | |
| Google Apps for Android 6.0 (https://www.androidfilehost.com/?fid=24052804347835438 - benzo-gapps-M-20151011-signed-chroma-r3.zip) | |
| Google Apps for Android 5.1 (https://www.androidfilehost.com/?fid=96042739161891406 - gapps-L-4-21-15.zip) | |
| Google Apps for Android 5.0 (https://www.androidfilehost.com/?fid=95784891001614559 - gapps-lp-20141109-signed.zip) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // --- Compiling --- | |
| $ wget http://download.redis.io/releases/redis-2.8.3.tar.gz | |
| $ tar xzvf redis-2.8.3.tar.gz | |
| $ cd redis-2.8.3 | |
| $ make | |
| $ make install | |
| // --- or using yum --- | |
| $ rpm -Uvh http://download.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm | |
| $ rpm -Uvh http://rpms.famillecollet.com/enterprise/remi-release-6.rpm |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| //viewDidload | |
| if ([self respondsToSelector:@selector(setNeedsStatusBarAppearanceUpdate)]) { | |
| // iOS 7 | |
| [self prefersStatusBarHidden]; | |
| [self performSelector:@selector(setNeedsStatusBarAppearanceUpdate)]; | |
| } else { | |
| // iOS 6 | |
| [[UIApplication sharedApplication] setStatusBarHidden:YES withAnimation:UIStatusBarAnimationSlide]; | |
| } |