Get a VPS that offers 2 or more IP addresses.
From the WHM cPanel, find the menu item Service Configuration
, select Apache Configuration
and then click on Reserved IPs Editor
.
#change the working directory to the Desktop | |
cd ~/Desktop | |
#unzip the word doc into a new directory called anonDocument | |
unzip myDocument.docx -d anonDocument/ | |
#search all of the files in the word doc package and replace any comment or track changes author with anonymous edit | |
grep -rl "w:author" ./anonDocument | xargs sed -i '' 's/w:author="[a-zA-Z0-9 ]*"/w:author="anonymous edit"/g' | |
#change the working directory to the anonDocument directory |
Day | |
--- | |
%a weekday, abbreviated Tue | |
%A weekday, full Tuesday | |
%d day of the month (dd), zero padded 22 | |
%e day of the month (dd) 22 | |
%j day of year, zero padded 001-366 | |
%u day of week starting with Monday (1), i.e. mtwtfss 2 | |
%w day of week starting with Sunday (0), i.e. smtwtfs 2 |
<!-- For our post on email personalization at scale: https://www.hull.io/blog/email-personalization/ --> | |
<!-- Read and subscribe to Hull --> | |
<p>Hi {% if customer.first_name != blank %}{{ customer.first_name | capitalize }}{% else %}there{% endif %},</p> | |
<p> | |
{% if customer.clearbit-employment_name == "Drift" %} | |
Last week, we saw you guys launched your new marketing email product. Congrats! We love the direction you're challenging marketers to take. | |
{% elsif customer.clearbit-location contains "Boston" %} | |
Last week, you might have seen another Boston-based tech company launching their new marketing email product. |
How to install and run Headless nightmare.js based scripts in Ubuntu. | |
Steps: | |
1. Spin Ubuntu 16.04 x64 server | |
2. Run: apt-get update | |
3. Run: apt-get upgrade | |
4. Run: apt-get install -y libgtk2.0-0 libgconf-2-4 libasound2 libxtst6 libxss1 libnss3 xvfb | |
5. Install Node.js 6+. See: https://nodejs.org/en/download/package-manager/#debian-and-ubuntu-based-linux-distributions | |
You can then run your script using this command: |
var getTableDataAJAX = function() { | |
var getTableData = new XMLHttpRequest(); | |
getTableData.onreadystatechange = function() { | |
if(getTableData.readyState === 4) { | |
var tableInfo = JSON.parse(getTableData.responseText); | |
var tableHeading = tableInfo.tableHeading; | |
var tableCellsPets = tableInfo.tableCellsPets; | |
var tableCellsPeople = tableInfo.tableCellsPeople; |
console.log([...new Set(new URL('https://www.amazon.com/SanDisk-128GB-microSDXC-Memory-Adapter/dp/B073JYC4XM/memory').pathname.toLowerCase().split(/-|\//gi).filter(Boolean))]) | |
//output handles dupes for casing and removes falsy values | |
//[ 'sandisk','128gb','microsdxc','memory','adapter','dp','b073jyc4xm' ] | |
const CDP = require('chrome-remote-interface'); | |
const chromeLauncher = require('chrome-launcher'); | |
const cheerio = require('cheerio'); | |
(async function() { | |
const launchChrome = () => | |
chromeLauncher.launch({ chromeFlags: ['--disable-gpu', '--headless'] }); | |
const chrome = await launchChrome(); | |
const protocol = await CDP({ port: chrome.port }); |
/** | |
* This is a project designed to get around sites using Cloudflare's "I'm under attack" mode. | |
* Using the PhantomJS headless browser, it queries a site given to it as the second parameter, | |
* waits six seconds and returns the cookies required to continue using this site. With this, | |
* it is possible to automate scrapers or spiders that would otherwise be thwarted by Cloudflare's | |
* anti-bot protection. | |
* | |
* To run this: phantomjs cloudflare-challenge.js http://www.example.org/ | |
* | |
* Copyright © 2015 by Alex Wilson <antoligy@antoligy.com> |
-- Decoding | |
SELECT CONVERT_FROM(DECODE(field, 'BASE64'), 'UTF-8') FROM table; | |
-- Encoding | |
SELECT ENCODE(CONVERT_TO(field, 'UTF-8'), 'base64') FROM table; |