momolog.info
MoMolog » AWS
http://momolog.info/category/aws
Copying Files between S3 buckets. Juli 8, 2010 at 12:27 pm · Filed under AWS. Building on this article. Here is a simple ruby script, that copies files between two buckets of the same S3 account, omitting files already present (by name). This variant adds a list of path prefixes, so you can selectively copy only certain directories of your buckets. Furthermore it copies the original buckets ACLs for each key. MoMolog aus Berlin stellt sich vor. Projekte, Ideen, Referenzen. Globuli – Musik aus Berlin.
momolog.info
MoMolog » Connecting to redis via SSH tunneling
http://momolog.info/2011/12/02/connect-to-redis-via-ssh-tunneling
Connecting to redis via SSH tunneling. Dezember 2, 2011 at 12:46 pm · Filed under Allgemein. SSH tunneling is, of course, useful for a ton of services, but I happened to stumble upon it, when I wanted to connect to a remote redis server. If you have a redis server running on [remotehost], you can easily connect. To it (given you have ssh access to it, of course) via:. Ssh -L 9999:localhost:6379 [remoteuser]@[remotehost]. Mai 24, 2012 @ 3:01 am. Juni 5, 2015 @ 4:27 pm. Feed for comments on this post.
momolog.info
MoMolog » Saving local text files to S3 using paperclip
http://momolog.info/2011/12/02/saving-local-text-files-to-s3-using-paperclip
Saving local text files to S3 using paperclip. Dezember 2, 2011 at 12:49 pm · Filed under Rails. Sometimes you need to save a locally created file to S3 instead of an uploaded file, as is the standard. Here is how:. Has attached file :tagged text file, STORAGE OPTIONS.merge({ :processors = [] }). Def save tagged text file. File = File.open(„#{RAILS ROOT}/tmp/tagged text #{id}.txt“, ‚w ‘). E-mail (required, not published! MoMolog aus Berlin stellt sich vor. Projekte, Ideen, Referenzen.
momolog.info
MoMolog » Use CSS to change link content on hover
http://momolog.info/2014/02/18/use-css-to-change-link-content-on-hover
Use CSS to change link content on hover. Februar 18, 2014 at 2:29 pm · Filed under Allgemein. Using just a data-attribute and a simple stylesheet rule it is possible to change the content of a link when hovering over it. Use an HTML / SASS combination like the following:. See this in action. E-mail (required, not published! MoMolog aus Berlin stellt sich vor. Projekte, Ideen, Referenzen. Globuli – Musik aus Berlin. Theater und Orchester GmbH. Psychotherapeutische Praxis Katharina Heldt-Erche.
momolog.info
MoMolog » Copying Files between S3 buckets
http://momolog.info/2010/07/08/copying-files-between-s3-buckets
Copying Files between S3 buckets. Juli 8, 2010 at 12:27 pm · Filed under AWS. Building on this article. Here is a simple ruby script, that copies files between two buckets of the same S3 account, omitting files already present (by name). This variant adds a list of path prefixes, so you can selectively copy only certain directories of your buckets. Furthermore it copies the original buckets ACLs for each key. E-mail (required, not published! Globuli – Musik aus Berlin. Theater und Orchester GmbH.
momolog.info
MoMolog » Using throw and catch to tidy up our code
http://momolog.info/2012/03/29/using-throw-and-catch-in-controllers
Using throw and catch to tidy up our code. März 29, 2012 at 12:17 pm · Filed under Rails. Let’s say we want a simple controller action that checks, if a given code is valid. It should return true and false and, if the code is invalid, give the reason (whether that is because it is unknown or because it has been used already). The action could look like this:. Now this deep nesting effectively hides the underlying algorithm, a simple one in this case. Straightens the code a bit:. We are down to one.
momolog.info
MoMolog » MySQL BEFORE INSERT trigger as check constraint
http://momolog.info/2009/10/21/mysql-before-insert-trigger-as-check-constraint
MySQL BEFORE INSERT trigger as check constraint. Oktober 21, 2009 at 11:03 am · Filed under Allgemein. Since MySQL does neither have real check constraints nor a way to raise an exception in a stored procedure, we found it not instantly obvious, how we could *reject* a certain row on insert, based on a certain condition. A nice way we found was to set the value in question to NULL, based on the condition and let the NOT NULL constraint do its work. E-mail (required, not published! Kurse suchen – St...
momolog.info
MoMolog » Rails
http://momolog.info/category/ruby/rails
Using throw and catch to tidy up our code. März 29, 2012 at 12:17 pm · Filed under Rails. Let’s say we want a simple controller action that checks, if a given code is valid. It should return true and false and, if the code is invalid, give the reason (whether that is because it is unknown or because it has been used already). The action could look like this:. Now this deep nesting effectively hides the underlying algorithm, a simple one in this case. Straightens the code a bit:. We are down to one. Bühne...
momolog.info
MoMolog » Push local branch to specific heroku app
http://momolog.info/2011/11/28/push-local-branch-to-specific-heroku-app
Push local branch to specific heroku app. November 28, 2011 at 7:33 pm · Filed under Note to self. You use two heroku apps as staging and production for your project. You added both as git remotes, e.g. „production“ and „staging“. Now you want to push your local branch „poster“ to remote „staging“, use. Git push staging poster:master. Note, that you can only push to „master“ on herokus side. This is just git syntax, but I keep forgetting it, so here it is for future reference. Theater und Orchester GmbH.
momolog.info
MoMolog » HTML5 input validation with custom message
http://momolog.info/2014/09/29/html5-input-validation-with-custom-message
HTML5 input validation with custom message. September 29, 2014 at 11:45 am · Filed under Allgemein. HTML5 provides us with ways to specify different types of input, complete with client side validation. Inputs can be marked as. And it is even possible to specify regexp patterns. Let’s put this into action by creating an input for german zip codes, consisting of 5 numbers:. As you can see, this works, but the actual validation message you get when entering a wrong. Unfortunately there is no. Kanzlei Achou...