Titanium reminders for boooooooring operations (OSX only)
keytool -genkeypair -v -keystore keystore -keyalg RSA -sigalg SHA1withRSA -validity 10000
| // AppDelegate.swift | |
| import UIKit | |
| @UIApplicationMain | |
| class AppDelegate: UIResponder, UIApplicationDelegate { | |
| var window: UIWindow? | |
| var activeCornerRadius : Int = 6 | |
| var incativeCornerRadius : Int = 0 |
| brew_cask_install() { | |
| if ! brew_cask_is_installed "$1"; then | |
| brew cask install "$@" | |
| fi | |
| } | |
| brew_cask_is_installed() { | |
| local NAME=$(brew_cask_expand_alias "$1") | |
| brew cask list -1 | grep -Fqx "$NAME" | |
| } |
| "use strict"; | |
| var test = '<b style="color:#fff; background: red">He<i>ll</i>o </b><u>Wo<i>rld</i></u>'; | |
| function parseStyle(text){ | |
| // Patterns and temp strings | |
| var tags_rx = /<\s*(\/?\s*[^>]+)(\s+[^>]+)?\s*>/gm, | |
| css_rx = /([\w-]+\s*:\s*[^\n;"']+)/gm, | |
| partial, tag, css, temp_style; | |
| # Logstash config for Glassfish logs | |
| # Used in combination with slf4j and logback | |
| # Output: | |
| # - application: glassfish | |
| # - type: application or internal | |
| # - categorie: technical or functional | |
| input { | |
| # If running logstash under a different user then check your permission to be sure that |
| // Put your file to "YOUR_UNITY_PROJ/Assets/StreamingAssets" | |
| // example: "YOUR_UNITY_PROJ/Assets/StreamingAssets/db.bytes" | |
| string dbPath = ""; | |
| if (Application.platform == RuntimePlatform.Android) | |
| { | |
| // Android | |
| string oriPath = System.IO.Path.Combine(Application.streamingAssetsPath, "db.bytes"); | |
| #!/bin/bash | |
| # | |
| # Watch current directory (recursively) for file changes, and execute | |
| # a command when a file or directory is created, modified or deleted. | |
| # | |
| # Written by: Senko Rasic <senko.rasic@dobarkod.hr> | |
| # | |
| # Requires Linux, bash and inotifywait (from inotify-tools package). | |
| # | |
| # To avoid executing the command multiple times when a sequence of |
| # | |
| # Add Google Analytics tracking code to HTML response | |
| # | |
| # Usage: | |
| # set $tracking_id 'UA-12345678-9'; | |
| # include incl/analytics.conf; | |
| # | |
| # It needs nginx compiled with option --with-http_sub_module. | |
| # Uses optimized GA code from: http://mathiasbynens.be/notes/async-analytics-snippet | |
| # |
Look at LSB init scripts for more information.
Copy to /etc/init.d:
# replace "$YOUR_SERVICE_NAME" with your service's name (whenever it's not enough obvious)