#Few Line of Hack Code Make React-Native Run on Windows
While React-Native just add support of Android,yet officeally they just only support on OSX.
After a few hours of debugging, I find a simple way of let React-Native run on Windows.
| #!/bin/bash | |
| # This is a modification of gitlab-gc.sh script created by Peter Bábics (pbabics/gitlab-gc.sh) | |
| # Improvements | |
| # - Searching in all BASE_PATH, not fixing the search to a depth of 2 | |
| # - Directories without valid tags or revisions directories won't be processed (to avoid unexpected issues) | |
| # - Logging in case there's nothing to delete | |
| # - running registry-garbage-collect only when something has been deleted |
| function check(resolved) { | |
| console.log(resolved); | |
| var tag = resolved.split('/').pop(-1); | |
| var latest = tag.slice(1); | |
| var current = atom.getVersion(); | |
| if (latest != current) { | |
| atom.notifications.addInfo('new version available: ' + resolved); | |
| // TODO detect platform | |
| // var filename = 'atom-amd64.deb'; // or 'atom.x86_64.rpm' | |
| // var url = 'https://github.com/atom/atom/releases/download/' + tag + '/' + filename; |
| # lib/tasks/db.rake | |
| namespace :db do | |
| desc "Dumps the database to db/APP_NAME.dump" | |
| task :dump => :environment do | |
| cmd = nil | |
| with_config do |app, host, db, user| | |
| cmd = "pg_dump --host #{host} --username #{user} --verbose --clean --no-owner --no-acl --format=c #{db} > #{Rails.root}/db/#{app}.dump" | |
| end | |
| puts cmd |
Magic words:
psql -U postgresSome interesting flags (to see all, use -h or --help depending on your psql version):
-E: will describe the underlaying queries of the \ commands (cool for learning!)-l: psql will list all databases and then exit (useful if the user you connect with doesn't has a default database, like at AWS RDS)| sudo yum update | |
| sudo yum groupinstall "Development Tools" | |
| sudo yum install git pcre pcre-devel gcc make zlib zlib-devel openssl openssl-devel sqlite-devel | |
| git clone git://github.com/sstephenson/rbenv.git .rbenv | |
| echo 'export PATH="$HOME/.rbenv/bin:$PATH"' >> ~/.bash_profile | |
| echo 'eval "$(rbenv init -)"' >> ~/.bash_profile | |
| mkdir -p ~/.rbenv/plugins | |
| cd ~/.rbenv/plugins |
| The MIT License (MIT) | |
| 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 furnished to do so, | |
| subject to the following conditions: | |
| The above copyright notice and this permission notice shall be included in all |
The Jenkins Last Commit widget periodically fetches SCM change information from a Jenkins instance for a specified list of jobs.
This allows you to have multiple widgets simultaneously (monitoing separate jobs for changes).
Calls are made to the Jenkins API to retrieve the changeset object in a JSON form. This JSON object contains various pieces of information about the last commit made for the Jenkins job.
#Scoped Invitation System for User Groups with Rails#
Starting out with the following models and associations:
####User
####Organization (User Group)