This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#SSH Tunnel | |
ssh docker@$(docker-machine ip default) -L host_ip:host_port:guest_ip:guest_port (pass: tcuser) | |
#Virtualbox forward | |
#When the machine is running | |
VBoxManage controlvm <docker_machine_name> natpf1 “<rule_name>,<rule_protocol>,<host_ip>,<host_port>,<guest_ip>,<guest_port>“; | |
#When the machine isn't running |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import sys | |
reload(sys) | |
sys.setdefaultencoding('utf8') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1. Go to settings > Technical > Parameters > System parameters | |
2. Make a new paramater | |
Name: web.base.url.freeze | |
Value: True | |
3. Edit the parameter web base.url and place the ip on http://0.0.0.0:8069 | |
4. Refresh and everything is fixed. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
openssl req -new -x509 -days 365 -nodes -out /etc/ssl/certs/test.crt -keyout /etc/ssl/private/test.key |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#To do it: | |
<field name="groups_id" eval="[(3,ref('my_new_group_id'))]"/> | |
#Numbers relation | |
(0, 0, { values }) -- link to a new record that needs to be created with the given values dictionary | |
(1, ID, { values }) -- update the linked record with id = ID (write values on it) | |
(2, ID) -- remove and delete the linked record with id = ID (calls unlink on ID, that will delete the object completely, and the link to it as well) | |
(3, ID) -- cut the link to the linked record with id = ID (delete the relationship between the two objects but does not delete the target object itself) | |
(4, ID) -- link to existing record with id = ID (adds a relationship) | |
(5) -- unlink all (like using (3,ID) for all linked records) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
bundle exec rake gitlab:import:repos RAILS_ENV=production |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* fkey of pkey: */ | |
select * from information_schema.referential_constraints where unique_constraint_name = 'delivery_carrier_pkey'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
mike@rbci:~$ psql -U postgres | |
psql (9.0.3) | |
Type "help" for help. | |
postgres=# update pg_database set datallowconn = TRUE where datname = 'template0'; | |
UPDATE 1 | |
postgres=# \c template0 | |
You are now connected to database "template0". | |
template0=# update pg_database set datistemplate = FALSE where datname = 'template1'; | |
UPDATE 1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<para>[[ repeatIn(filter( lambda participant : participant.is_instructor == True ,course.participant_ids), 'participant') ]]</para> |
NewerOlder