Ctrl + W
Type Text 'TEXT TO SEARCH'
Press 'Enter'
Press Alt + W to find next occurrence of text
Select: ALT + M + A
Cut selected text/Current Line: Ctrl + K
Copy: ALT + 6
| # Edit .bashrc file with | |
| $ cd | |
| $ nano ~/.bashrc | |
| # Add following lines if not present, if commented uncomment these lines | |
| if [ -f ~/.bash_aliases ]; then | |
| . ~/.bash_aliases | |
| fi |
| $("form.validate:not([novalidate])").each(function() { | |
| formValidations = { | |
| errorElement: "span", | |
| errorClass: "errorField", | |
| rules: {}, | |
| messages: {} | |
| }; | |
| $(this).find("input, select, textarea").each(function() { | |
| if ($(this).data("rules") !== undefined) { | |
| formValidations['rules'][$(this).attr('name')] = $(this).data("rules"); |
| # https://help.ubuntu.com/10.04/serverguide/postgresql.html | |
| $ sudo apt-get install postgresql postgresql-contrib | |
| # To enable TCP/IP connections, edit the file /etc/postgresql/9.1/main/postgresql.conf | |
| # and locate the line #listen_addresses = 'localhost' and | |
| # change it to: listen_addresses = 'localhost' | |
| $ sudo nano /etc/postgresql/9.1/main/postgresql.conf |
| flashTimer = null | |
| $(document).ready -> | |
| c = undefined | |
| CommonJs = | |
| settings: | |
| domInputs: -> | |
| $("input[type='text'], input[type='email'], input[type='password']") | |
| init: -> | |
| c = @settings |
| https://sublime.wbond.net/installation#st3 | |
| The simplest method of installation is through the Sublime Text console. The console is accessed via the ctrl+` shortcut or the View > Show Console menu. Once open, paste the appropriate Python code for your version of Sublime Text into the console. | |
| SUBLIME TEXT 3 | |
| import urllib.request,os,hashlib; h = '7183a2d3e96f11eeadd761d777e62404e330c659d4bb41d3bdf022e94cab3cd0'; pf = 'Package Control.sublime-package'; ipp = sublime.installed_packages_path(); urllib.request.install_opener( urllib.request.build_opener( urllib.request.ProxyHandler()) ); by = urllib.request.urlopen( 'http://sublime.wbond.net/' + pf.replace(' ', '%20')).read(); dh = hashlib.sha256(by).hexdigest(); print('Error validating download (got %s instead of %s), please try manual install' % (dh, h)) if dh != h else open(os.path.join( ipp, pf), 'wb' ).write(by) | |
| SUBLIME TEXT 2 | |
| import urllib.request,os,hashlib; h = '7183a2d3e96f11eeadd761d777e62404e330c659d4bb41d3bdf022e94cab3cd0'; pf = 'Package Control.subl |
| $ cd /var/www | |
| $ ll | |
| drwxr-xr-x 5 root root 4096 Mar 7 12:52 wp | |
| Installing php5-fpm | |
| sudo apt-get install php5-fpm | |
| php5-fpm configuration.Open up www.conf: | |
| sudo nano /etc/php5/fpm/pool.d/www.conf |
| angular.module('image-preview-demo',[]).directive('imgPreviewElem', [function () { | |
| return { | |
| restrict: 'AE', | |
| link: function(scope, elem, attrs) { | |
| console.log("directive called") | |
| elem.bind('change', function () { | |
| var file=elem[0].files[0], | |
| imageType=/(image.jpeg|image.png|image.jpg)/, | |
| imgElementId = attrs.imgPreviewElem; |
| sudo -u postgres psql -d template1 -c "CREATE USER kalpesh WITH PASSWORD 'password' CREATEDB;" | |
| sudo -u postgres psql -d template1 -c "CREATE DATABASE sample_db OWNER kalpesh;" | |
| sudo -u postgres psql -d template1 -c "CREATE USER kalpesh CREATEDB;" | |
| sudo -u postgres -H psql -d template1 | |
| /* =========================== Users =========================== */ | |
| /* Create User with password */ | |
| CREATE USER kalpesh WITH PASSWORD 'kalpesh'; | |
| /* Drop User */ |
| heroku pg:psql --app APP_NAME | |
| \copy (SELECT users.id, CONCAT(first_name, ' ', middle_name, ' ', last_name) AS full_name, username, dob, gender, address_line_1, address_line_2, province, zipcode, email, phone_number, minor, roles.name as role, avatar_url, email_frequency, sign_in_count, license_code, city, elise_points, used_points, contact_person, phone, website, chamber_of_commerce_no, notes FROM users LEFT JOIN roles on role_id=roles.id) TO users-8feb-2016.csv CSV HEADER DELIMITER ',' |