This file contains hidden or 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
| // sitecake/x.x.x/config/config.php | |
| // change empty array in # SESSION CONFIGURATION SECTION | |
| $app['session.options'] = []; | |
| // add path of current www location | |
| $app['session.options'] = [ | |
| 'save_path' => '/home/www-data/.../html' | |
| ]; |
This file contains hidden or 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
| # MacOS | |
| # edit file: | |
| /Users/username/Library/Jupyter/kernels/python3/kernel.json | |
| # change ___ENVPATH___ to a working one | |
| { | |
| "argv": [ | |
| "/____ENVPATH____/bin/python", |
This file contains hidden or 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
| # every item | |
| all(item.prop == '' for item in items) | |
| # at least one item | |
| any(item.prop == '' for item in items) | |
| # any item of a is in b | |
| any(any(x==y for y in b) for x in a) |
This file contains hidden or 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
| function getParam(param){ | |
| return new URLSearchParams(window.location.search).get(param); | |
| } |
This file contains hidden or 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
| brew cask install qlstephen |
This file contains hidden or 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
| ul { | |
| list-style-type: none; | |
| padding-left: 20px; | |
| } | |
| li { | |
| position: relative; | |
| padding-left: 20px; | |
| margin-bottom: 10px | |
| } |
This file contains hidden or 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
| $(function() { | |
| var map = '#gmap-holder'; | |
| $(map).find('iframe').css('pointer-events', 'none'); | |
| $(map).click(function(e) { | |
| $(this).find('iframe').css('pointer-events', 'all'); | |
| }).mouseleave(function(e) { | |
| $(this).find('iframe').css('pointer-events', 'none'); | |
| }); | |
| }) |
This file contains hidden or 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
| chmod +x SomeApp.app/Contents/MacOS/* | |
| # AND/OR disable app security restrictions | |
| sudo spctl --master-disable |
This file contains hidden or 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
| from django.db import connection | |
| def idseq(model_class): | |
| return '{}_id_seq'.format(model_class._meta.db_table) | |
| def get_next_id(model_class): | |
| cursor = connection.cursor() | |
| sequence = idseq(model_class) | |
| cursor.execute("select nextval('%s')" % sequence) | |
| row = cursor.fetchone() |
This file contains hidden or 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
| ffp = webdriver.FirefoxProfile() | |
| # for example load websocket monitor | |
| websocket = os.path.join(os.getcwd(), 'path/websocket_monitor-0.6.4-fx.xpi') | |
| ffp.add_extension(websocket) | |
| context.browser = webdriver.Firefox(firefox_profile=ffp) |