Creează un cont pentru a te abona la acest blog și a-i urmări articolele pe pagina Lectură.
-
When git uses less as pager the output of commands like git log disappears from the console screen when you exit from less.
-
Let’s assume we have a history like this: G1 - G2 - G3 - B1 - B2 - B3 Where G1-G3 are ‘good’ commits and B1-B3 are ‘bad’ commits and we want to revert them.
-
It is possible to ask node to show its core module source.
-
To debug mocha test with node inspector use the delay before test: beforeEach(function(done) { //start mocha as //mocha -t 10000 --debug setTimeout(function() { done(); }, 5000); }); This way there are 5 seconds to start the node inspector and set a break…
-
Problem I have a console command in php which needs access to DB.
-
By default Elastic Beanstalk console tool (eb) adds config files to .gitignore.
-
D3.js D3.js is a JavaScript library for manipulating documents based on data.
-
Git Server Prerequisites are git and ssh-server (apt-get install openssh-server).
-
Amazon provides following NoSQL storage options: [SimpleDB] (http://aws.amazon.com/simpledb/) - Amazon SimpleDB is a highly available and flexible non-relational data store that offloads the work of database administration.
-
With angular.js you have an HTML which looks like this: <span>{{variableValue}}</span> <ul> <li ng-repeat="item in items" ng-bind="item.name"></li> </ul> The simple way to make this content SEO-friendly is to pre-render data on the server and then allow a…
-
Enable mbstring function overloading mode and set default encoding for string functions to utf-8 in php.ini: mbstring.internal_encoding = UTF-8 mbstring.func_overload = 7 These settings allow us to use “usual” php string functions like substr() for utf-8…
-
The Scalable JavaScript Application Architecture is a presentation by Nicholas Zakas where he suggests a flexible and scalable architecture for JavaScript applications.
-
A list of extensions to manage position of chrome tabs / windows and to create splits.
-
Diff and log between two branches (all changes on both branches) To see all changes between two branches, use diff with two or three dots and log with three dots between branch names.
-
Branches that were not merged with master: git branch -a --no-merged (or git branch -a --no-merged master) Branches that were merged with feature: git branch -a --merged feature Branches that were merged not with feature: git branch -a --no-merged feature…
-
Your branch is ahead of ‘origin/master’ by 1 commit (or X commits) after git pull origin master.
-
Solution from stackoverflow.
-
With this method we work on the server with UTC timezone dates and convert them to a user local timezone on client.
-
The jquery.localtime plugin allows to convert date/time strings to a local user time on a client site.
-
Below are some notes regarding the innodb transactions and locks.
-
Below are some git commands which can be useful to resolve problems with submodules.
-
Assume we have an action “articles/get” which accepts optional parameters and we want to setup following URLs: articles/[article id or name] articles/[article id or name]/draft articles/[article id or name]/revisions/99 articles/[article id or name]/revis…
-
Problem Selenium 2.25.0, python 2.7, ubuntu 12.04, Firebox 4.0 (yes, old version but we need it) hangs when uploading a file larger then (about) 600KB.
-
ejs has a client-side support but documentation and examples do not describe how to reuse the same template on the server and on the client side.
-
This can be necessary for example for selector like #id > li:visible.
-
The ’executeScript’ method of the webdriver receives additional ‘arguments’ variable and we can pass WebElement instances to the script.
-
To set the php session cookie we can use the addcookie (or python version add_cookie) method of the webdriver.
-
To use fugitive as a merge tool you can run the following commands: git config --global mergetool.fugitive.cmd 'vim -f -c "Gdiff" "$MERGED"' git config --global merge.tool fugitive Links stackoverflow fugitive screencast
-
It is often useful to copy, let’s say new_name, to clipboard and then replace one or more occurrences of old_name with it.
-
There are several ways to speedup slow unit tests which interact with database: Refactor code and tests and do not interact with db in unit tests Use sqlite db in memory instead of MySql Use MySql MEMORY engine Move MySql data to memory It is better to try
-
Error when trying to access phpmyadmin (in Chrome): Error 324 (net::ERR_EMPTY_RESPONSE): The server closed the connection without sending any data.
-
C++ allows to declare one class as a friend of another one.
-
Rename local branch: git branch -m old-branch-name new-branch-name Rename remote branch: #delete remote branch with old name git push origin :old-branch-name # create remote renamed branch git push origin new-branch-name Links stackoverflow
-
To remove files that were already deleted on the file system, run git add with -u flag: git status D abc.c git add -u This tells git to automatically stage tracked files - including deleting the previously tracked files.
-
GImport yii extension implements recursive import of directories with caching.
-
By default angular.js sends all data in json.
-
This method allows to log InnoDB monitor output when deadlock error occured.
-
oAuth 1.0 flow A good explanation image from oauth.net: Flow description: Consumer has Consumer Key and Consumer Secret (shared secret) A) Consumer requests Request Token call get_request_token from Service Provider, send oauth_consumer_key oauth_signatur…
-
To have colored git commands output, use the following command: git config color.ui true or (globally) git config --global color.ui true Alternatively, you can set color for individual git commands. git config color.branch auto git config color.diff auto…
-
Selenium tests require browser to run, so usually we run them on the X-server enabled machine.
-
Problem: selenium fails to start Firefox with following error: 'The browser appears to have exited before we could connect.
-
Git error: Your branch and 'origin/xxx' have diverged, and have 1 and 1 different commit(s) each, respectively.
-
It seems that we have no perfect solution for class table inheritance (or multiple table inheritance) in yii (comparing to the very good one for single table inheritance).
-
Note: in recent git versions, it is enough to do git pull and git checkout feature to checkout and start tracking the remote branch.
-
To check whether jQuery is loaded to the page and verify minimum version: if (typeof jQuery == 'undefined' || !