Skip to content

Instantly share code, notes, and snippets.

@organizm
organizm / angular.js
Created September 14, 2016 08:58
Angular if apply #angular
if(!$scope.$$phase) {
// $digest or $apply;
$scope.$apply();
}
@organizm
organizm / 0_reuse_code.js
Created February 16, 2017 08:58
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@organizm
organizm / Magento_clean_up.php
Last active June 13, 2017 11:16
Magento clean up #magento
<?php
switch($_GET['clean']) {
case 'log':
clean_log_tables();
break;
case 'var':
clean_var_directory();
break;
}
@organizm
organizm / remove.attribute.js
Last active April 5, 2019 09:55
[Remove nested attribute in DynanmoDB]#DynanmoDB
let docClient = new AWS.DynamoDB.DocumentClient();
let params = {
TableName : "customer",
Key : {
"customerId": "customer_001"
},
UpdateExpression : "REMOVE address.street3",
ReturnValues : "UPDATED_NEW"
};
@organizm
organizm / start_chrome_desctop.sh
Last active January 9, 2022 11:33
How to install end start chrome remote desctop #ubuntu
Mostly from https://aur.archlinux.org/packages/chrome-remote-desktop/?comments=all but with some of my changes.
1. I manually created the chrome-remote-desktop group, and added myself to it.
2. I manually created the ~/.chrome-remote-desktop-session file with "exec startxfce4" in it.
3. I manually created the ~/.config/chrome-remote-desktop directory.
4. mkdir /etc/chromium-browser/native-messaging-hosts
4. ln -s /etc/opt/chrome/native-messaging-hosts/* /etc/chromium-browser/native-messaging-hosts/
You should now have a 'Enable Remote Connection' button on the CRD extension page.