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
| """ | |
| clients array: | |
| 0 - Socket | |
| 1 - nickname | |
| 2 - active client or not (0 active , -1 disconnected) | |
| 3 - client ip | |
| """ | |
| from socket import * # sockets | |
| from threading import Thread # thread |
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
| <?php | |
| /** | |
| * @param $http2ch the curl connection | |
| * @param $http2_server the Apple server url | |
| * @param $apple_cert the path to the certificate | |
| * @param $app_bundle_id the app bundle id | |
| * @param $message the payload to send (JSON) | |
| * @param $token the token of the device | |
| * @return mixed the status code (see https://developer.apple.com/library/ios/documentation/NetworkingInternet/Conceptual/RemoteNotificationsPG/Chapters/APNsProviderAPI.html#//apple_ref/doc/uid/TP40008194-CH101-SW18) |
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
| using UnityEngine; | |
| using System.Collections; | |
| public class ExampleClass : MonoBehaviour { | |
| public Rigidbody projectile; | |
| void Update() { | |
| if (Input.GetButtonDown("Fire1")) { | |
| Rigidbody clone; | |
| clone = Instantiate(projectile, transform.position, transform.rotation) as Rigidbody; | |
| clone.velocity = transform.TransformDirection(Vector3.forward * 10); |
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
| # with AJAX withCredentials=false (cookies NOT sent) | |
| Header always set Access-Control-Allow-Origin "*" | |
| Header always set Access-Control-Allow-Methods "POST, GET, PUT, OPTIONS, PATCH, DELETE" | |
| Header always set Access-Control-Allow-Headers "X-Accept-Charset,X-Accept,Content-Type" | |
| RewriteEngine On | |
| RewriteCond %{REQUEST_METHOD} OPTIONS | |
| RewriteRule ^(.*)$ $1 [R=200,L,E=HTTP_ORIGIN:%{HTTP:ORIGIN}]] | |
| # with AJAX withCredentials=true (cookies sent, SSL allowed...) | |
| SetEnvIfNoCase ORIGIN (.*) ORIGIN=$1 |
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
| <link rel="import" href="../chart-js/chart-js.html"> | |
| <link rel="import" href="../speech-mic/speech-mic.html"> | |
| <link rel="import" href="../topeka-elements/category-icons.html"> | |
| <link rel="import" href="../core-icon/core-icon.html"> | |
| <polymer-element name="my-element"> | |
| <template> | |
| <style> | |
| :host { |
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
| ulimit -l unlimited | |
| /etc/sysctl.conf | |
| vm.swappiness = 0 | |
| /etc/sysconfig/elasticsearch | |
| ES_HEAP_SIZE=1024m | |
| ES_JAVA_OPTS="-server” | |
| MAX_LOCKED_MEMORY=unlimited |
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
| //Define a cor padrão para o fundo da aplicação | |
| Titanium.UI.setBackgroundColor('#000'); | |
| // cria um grupo de tabs | |
| var tabGroup = Titanium.UI.createTabGroup(); | |
| // | |
| // cria a janela principal da primeira Tab | |
| // |