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
# create file ssl.sh with ======> | |
#!/bin/sh | |
# See https://devcenter.heroku.com/articles/ssl-certificate-self for overview | |
ssl_dir='ssllocal' | |
mkdir -p $ssl_dir | |
openssl genrsa -des3 -passout pass:x -out $ssl_dir/server.pass.key 2048 |
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
1. Configure config/application.rb for Subdomain Handling: | |
# config/application.rb | |
module YourAppName | |
class Application < Rails::Application | |
config.middleware.use SubdomainMiddleware | |
# ... other configurations | |
end | |
end |
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
# generated by chatgpt | |
# Configure your config/application.rb to handle subdomains: | |
# config/application.rb | |
module YourAppName | |
class Application < Rails::Application | |
config.middleware.use SubdomainMiddleware | |
# ... other configurations | |
end | |
end |
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
git config --global http.proxy http://proxyUsername:[email protected]:port | |
OR | |
git config --global http.proxy http://proxy.server.com:port |
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
#Remove old Ruby | |
$ yum remove ruby | |
# Install dependencies | |
$ yum groupinstall "Development Tools" | |
$ yum install zlib zlib-devel | |
$ yum install openssl-devel | |
$ wget http://pyyaml.org/download/libyaml/yaml-0.1.5.tar.gz | |
$ tar xzvf yaml-0.1.5.tar.gz | |
$ cd yaml-0.1.5 |
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
import Ember from 'ember'; | |
export default Ember.Component.extend({ | |
value: "", | |
actions: { | |
onEnter(title) { | |
if (title) { |
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
ActiveRecord::Base.connection.tables.each { |t| ActiveRecord::Base.connection.reset_pk_sequence!(t) } |
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
puts "start..." | |
require 'tiny_tds' | |
client = TinyTds::Client.new username: 'sa', password: '123***s', host: '192.168.1.215', port: 1433, database: 'alyamama' | |
#results = client.execute("SELECT * FROM motif_controle") | |
#puts results.fields | |
#results.each do |row| | |
# puts row | |
#end | |
#puts "---------------" | |
results = client.execute("EXEC sp_test") |
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
import Ember from 'ember'; | |
export default Ember.Controller.extend({ | |
appName: 'Ember exemple' | |
}); |
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
def directory_size(path) | |
path << '/' unless path.end_with?('/') | |
raise RuntimeError, "#{path} is not a directory" unless File.directory?(path) | |
total_size = 0 | |
Dir["#{path}**/*"].each do |f| | |
total_size += File.size(f) if File.file?(f) && File.size?(f) | |
end | |
# size in bytes |
NewerOlder