Skip to content

Instantly share code, notes, and snippets.

@j-n-c
j-n-c / win-machine_deployment_cleanup_checklist.txt
Last active November 30, 2016 13:43
Windows - Machine deployment clean-up checklist
This serves as a checklist to follow when deploying a Windows machine for production:
- Make sure the computer has correct auto load or OS and account without keyboard or password requirements
- Install teamviewer
-- http://www.teamviewer.com/
-- https://www.teamviewer.com/en/download/previous-versions/
-- IMPORTANT!: Save teamviewer id and password on a googledocs in the project folder
- What is Socket.IO?
-- Socket.IO is an event-based bi-directional communication layer for realtime web applications, built atop Engine.IO that allows developers to send and receive data without worrying about cross-browser compatibility.
-- It abstracts many transports, including AJAX long-polling and WebSockets
-- It has two parts: a client-side library that runs in the browser, and a server-side library for node.js. Both components have a nearly identical API.
- SERVER SIDE:
-- Server()
Creates a new Server (works with and without new):
Apache2 create self-signed certificate and configure SSL:
>> sudo a2enmod ssl
>> sudo service apache2 restart
>> sudo mkdir /etc/apache2/ssl
>> sudo openssl req -x509 -nodes -days 365 -newkey rsa:2048 -keyout /etc/apache2/ssl/apache.key -out /etc/apache2/ssl/apache.crt
>> sudo nano /etc/apache2/sites-available/default-ssl.conf:
-- SSLCertificateFile /etc/apache2/ssl/apache.crt
-- SSLCertificateKeyFile /etc/apache2/ssl/apache.key
>> sudo a2ensite default-ssl.conf
>> sudo service apache2 restart
- Enable running scripts in Apache2
>> a2enmod cgid
>> sudo service apache2 restart
>> sudo nano /etc/apache2/conf-enabled/serve-cgi-bin.conf
-- <IfDefine ENABLE_USR_LIB_CGI_BIN>
ScriptAlias /cgi-bin/ <path_to_scripts_folder>/
<Directory "<path_to_scripts_folder">
AllowOverride None
Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
AddHandler cgi-script .cgi .pl .py
@j-n-c
j-n-c / InstallWindows7onPCwithUSB3_0ports.txt
Last active November 30, 2016 13:45
Install Windows 7 on PC with USB3.0 ports
Intro: If you have tried to install Windows 7 using a USB Flash Drive on a system that only has USB 3.0 ports, you might have found that you couldn’t get past the Language Select screen of the installer as your keyboard and mouse didn’t work.
The keyboard and mouse worked great in the BIOS, but as soon as the Windows 7 installation media loaded and presented that familiar Language Select screen, I had no cursor or keyboard.
1. Get the right USB 3.0 Drivers
For your installer to work with your computer, make sure you grab the proper USB 3.0 drivers. Look up your Motherboard’s drivers, see which ones you need and download them.
2. Extract the Drivers
- Once you download the drivers, we will need to make a folder for the drivers we want to slipstream into our installation media. For the purpose of this example lets just call it “USB3_Fix.”
- Inside that folder create two separate folders: “USB3” and “mount”.
- Now extract all the drivers into that USB3 folder.
@j-n-c
j-n-c / ionic_resources_does_not_regenerate_data.txt
Last active November 30, 2016 13:42
Command ionic resources does not regenerate data (rather gets it from cache)
If command "ionic resources" does not generate new data (icons, etc) but instead reports that it is getting data from cache:
Ionic icon and splash screen resources generator
icon android drawable-ldpi-icon.png (36x36) from cache
icon android drawable-mdpi-icon.png (48x48) from cache
icon android drawable-hdpi-icon.png (72x72) from cache
icon android drawable-xhdpi-icon.png (96x96) from cache
icon android drawable-xxhdpi-icon.png (144x144) from cache
icon android drawable-xxxhdpi-icon.png (192x192) from cache
splash android drawable-land-ldpi-screen.png (320x240) from cache
@j-n-c
j-n-c / UbuntuGNOMEinsteadofUnity.txt
Last active June 29, 2016 15:57
Ubuntu GNOME instead of Unity
sudo apt-get update
sudo apt-get install gnome-session-fallback
@j-n-c
j-n-c / mysql_dump_and_restore.txt
Created June 15, 2016 15:10
MySQL DUMP and RESTORE
-> Backup MySQL Database
mysqldump -h <host_IP_addr> -u <user> --databases <database_name> -p > <name_of_dump_file>.sql
e.g. mysqldump -h 127.0.0.1 -u root --databases my_database -p > xpto.sql
-> Restore MySQL Database
mysql -p -h <host_IP_addr> -u <user> < <name_of_dump_file>.sql
e.g. mysql -p -h 192.168.1.40 -u my_user < xpto.sql
@j-n-c
j-n-c / Manage_services_in_autostart.txt
Last active November 30, 2016 13:45
Manage services in autostart
-> Prevent from running at startup (without uninstalling app):
$ sudo update-rc.d <service> disable
e.g. sudo update-rc.d tomcat disable