MD5: 59bab8f71f8c096cd3f72cd73851515d
Rename it to: Sublime Text
Make it executable with: chmod u+x Sublime\ Text
controllers.controller('MainCtrl', function($scope, $location, Facebook, $rootScope, $http, $location, Upload, Auth, User, Question, Category, Serie, Record, Location, Popup, Process, Card, Question) { | |
$scope.$on('authLoaded', function() { | |
$scope.isExpert($scope.main.serieId); | |
$scope.isMember($scope.main.serieId); | |
}); | |
$scope.loadAuth = function() { | |
Auth.load().success(function(data) { | |
$scope.main.user = data.user; | |
$scope.$broadcast("authLoaded"); |
var runner = require('child_process'); | |
runner.exec( | |
'php -r \'include("settings.php"); print json_encode($databases);\'', | |
function (err, stdout, stderr) { | |
var connection = JSON.parse(stdout).default.default; | |
console.log(connection.database); | |
// result botdb | |
} |
#!/bin/sh | |
### BEGIN INIT INFO | |
# Provides: <SCRIPT_NAME> | |
# Required-Start: $local_fs $network $named $time $syslog | |
# Required-Stop: $local_fs $network $named $time $syslog | |
# Default-Start: 2 3 4 5 | |
# Default-Stop: 0 1 6 | |
# Description: Script to run asp.net 5 application in background | |
### END INIT INFO |
<?php | |
$date = "2016-01-01"; | |
$outputFormat = "d/m/Y H:i:s"; | |
$startTime = strtotime(date($date)); | |
$endTime = strtotime(sprintf("%s 23:59:59", $date)); | |
$dateTimes = []; | |
while ($startTime < $endTime) { | |
$startTime += 60; |
require "csv" | |
class Admin::ExportsController < Admin::BaseAdminController | |
def index | |
admin = Admin.first | |
csv_string = CSV.generate do |csv| | |
csv << Admin.attribute_names | |
csv << admin.attributes.values | |
end |
======= Prolbem ================================================================================================================= | |
I have installed : ruby-2.0.0,postgres-9.2 , now in rails app when I execute: | |
rake db:create , command I get: | |
PG::InvalidParameterValue: ERROR: new encoding (UTF8) is incompatible with the encoding of the template database (SQL_ASCII) | |
HINT: Use the same encoding as in the template database, or use template0 as template. | |
: CREATE DATABASE "my_db_name" ENCODING = 'unicode'....... | |
bin/rake:16:in `load' |
<?php | |
class ResumeDownload { | |
private $file; | |
private $name; | |
private $boundary; | |
private $delay = 0; | |
private $size = 0; | |
function __construct($file, $delay = 0) { | |
if (! is_file($file)) { |
server { | |
listen 80 default_server; | |
listen [::]:80 default_server ipv6only=on; | |
root <Path to project folder>/public; | |
index index.php index.html index.htm; | |
server_name <Server name or IP address>; | |
location / { |
#!/usr/bin/env bash | |
redColor="\033[0;31m" | |
noColor="\033[0m" | |
function exitCodeToText() { | |
text="${redColor}NG${noColor}" | |
if [[ "$1" == "0" ]]; then | |
text="OK" | |
fi |