Step 1. Disable SIP. Boot into Recovery Mode. Open Terminal, type this and hit Enter
csrutil disable
Step 2. Reboot into Recovery Mode again. Open Terminal, using these commands
#Back up From the Command Line (using mysqldump) | |
#If you have shell or telnet access to your web server, you can backup your MySQL data by using the mysqldump command. | |
#This command connects to the MySQL server and creates an SQL dump file. | |
#The dump file contains the SQL statements necessary to re-create the database. Here is the proper syntax: | |
mysqldump --opt -u [uname] -p[pass] [dbname] > [backupfile.sql] | |
#For example, to backup a database named 'Tutorials' with the username 'root' and with no password to a file tut_backup.sql, | |
#you should accomplish this command | |
mysqldump -u root -p Tutorials > tut_backup.sql |
import undetected_chromedriver.v2 as uc | |
from selenium.webdriver.common.by import By | |
import re | |
opts = uc.ChromeOptions() | |
# opts.add_argument('--headless') | |
# opts.add_argument('--disable-gpu') | |
driver = uc.Chrome(options=opts) | |
keywords = ['Kể', 'từ', 'khi', 'dẫn', 'dắt', 'các', 'đội', 'tuyển', 'Việt', 'Nam', 'cuối', 'năm', '2017,', 'HLV', 'Park', 'chưa', 'từng', 'thua', 'các', 'đối', 'thủ', 'Đông', 'Nam', 'Á.', 'Ông', 'đặc', 'biệt', 'có', 'duyên', 'với', 'Malaysia', 'và', 'Indonesia.', 'Tại', 'vòng', 'loại', 'thứ', 'hai', 'World', 'Cup', '2022,', 'đội', 'tuyển', 'cùng', 'bảng', 'G', 'với', 'hai', 'đối', 'thủ', 'này', 'và', 'toàn', 'thắng', 'cả', 'bốn', 'trận.', 'Điểm', 'bất', 'lợi', 'với', 'Việt', 'Nam', 'là', 'cùng', 'lúc', 'thi', 'đấu', 'nhiều', 'mặt', 'trận.', 'Bên', 'cạnh', 'AFF', 'Cup', '2020,', 'đội', 'tuyển', 'còn', 'phải', 'đã', 'vòng', 'loại', 'thứ', 'ba', 'World', 'Cup', '2022', '-', 'khu', 'vực', 'châu', 'Á.', 'Điều', 'này', 'khiến', 'HLV', 'Park', 'phải', 'tính', 'toán', 'về', 'bài', 'toán', 'lực', |
-- First, update the attribute input type to multiselect | |
UPDATE eav_attribute SET | |
entity_type_id = 4, | |
attribute_model = NULL, | |
backend_model = 'eav/entity_attribute_backend_array', | |
backend_type = 'varchar', | |
backend_table = NULL, | |
frontend_model = NULL, | |
frontend_input = 'multiselect', | |
frontend_class = NULL |
class AdsManager { | |
constructor() { | |
let supportedAPIs = FBInstant.getSupportedAPIs(); | |
this.canShowInterstitialAds = supportedAPIs.includes('getInterstitialAdAsync'); | |
this.canShowRewardedVideoAds = supportedAPIs.includes('getRewardedVideoAsync'); | |
if (!this.canShowInterstitialAds) { | |
Sentry.captureMessage(window.platform + ' can\'t show interstitital ads'); | |
} | |
if (!this.canShowRewardedVideoAds) { | |
Sentry.captureMessage(window.platform + ' can\'t show rewarded video ads'); |
UPDATE `catalog_eav_attribute` | |
SET `used_for_sort_by` = 1 | |
WHERE attribute_id = ( | |
SELECT attribute_id FROM `eav_attribute` WHERE `entity_type_id` = (SELECT `entity_type_id` FROM `eav_entity_type` WHERE `entity_model` = "catalog/product") AND `attribute_code` = "created_at"); | |
UPDATE `eav_attribute` | |
SET frontend_label = "Newest" | |
WHERE `entity_type_id` = (SELECT `entity_type_id` FROM `eav_entity_type` WHERE `entity_model` = "catalog/product") and `attribute_code` = "created_at"; |
# ref: https://github.com/prasmussen/gdrive | |
# prerequisite: | |
# In google drive, setup your folder for storing the backups | |
# Then grab the code from the url e.g. https://drive.google.com/drive/folders/xxxxx where xxxxx is the code | |
# This code will be used later in the cron command, keep it secret, keep it safe | |
# install gdrive sync for backups | |
wget https://drive.google.com/uc?id=0B3X9GlR6EmbnQ0FtZmJJUXEyRTA -O /usr/local/bin/gdrive | |
chmod 755 /usr/local/bin/gdrive |
check process hhvm with pidfile /var/run/hhvm/pid | |
group hhvm | |
start program = "/usr/sbin/service hhvm start" with timeout 60 seconds | |
stop program = "/usr/sbin/service hhvm stop" | |
if failed unixsocket /var/run/hhvm/hhvm.sock then restart | |
if mem > 400.0 MB for 1 cycles then restart | |
if 5 restarts with 5 cycles then timeout |
$ uname -r
// Change straight quotes to curly and double hyphens to em-dashes. | |
function smarten(a) { | |
a = a.replace(/(^|[-\u2014/(\[{"\s])'/g, "$1\u2018"); // opening singles | |
a = a.replace(/'/g, "\u2019"); // closing singles & apostrophes | |
a = a.replace(/(^|[-\u2014/(\[{\u2018\s])"/g, "$1\u201c"); // opening doubles | |
a = a.replace(/"/g, "\u201d"); // closing doubles | |
a = a.replace(/--/g, "\u2014"); // em-dashes | |
return a | |
}; |