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
sed 's/\t/ /g' < input.php > output.php |
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
// Media queries breakpoints | |
// -------------------------------------------------- | |
// Extra small screen / phone | |
// Note: Deprecated @screen-xs and @screen-phone as of v3.0.1 | |
@screen-xs: 480px; | |
@screen-xs-min: @screen-xs; | |
@screen-phone: @screen-xs-min; | |
// Small screen / tablet |
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
HOMEMADE MOSQUITO TRAP: | |
Items needed: | |
1 cup of water | |
1/4 cup of brown sugar | |
1 gram of yeast | |
1 2-liter bottle | |
HOW: | |
1. Cut the plastic bottle in half. | |
2. Mix brown sugar with hot water. Let cool. When cold, pour in the bottom half of the bottle. |
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
### Keybase proof | |
I hereby claim: | |
* I am radiofrequency on github. | |
* I am radio (https://keybase.io/radio) on keybase. | |
* I have a public key whose fingerprint is 4B21 86A7 8814 1A23 12B2 0A05 AD2B D330 BED5 A7C8 | |
To claim this, I am signing this object: |
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
<?php | |
$all_links = file_get_contents("/home/fizz/Downloads/export-links.json"); | |
$post_id = rand(1, 1500); | |
$spin_text = ['Funny', 'Awesome', 'New', 'Cute'] | |
$spin = $post_id % $spin_text.length; | |
$json_puke = json_decode($all_links, true); | |
echo ucwords(strtolower($json_puke[$post_id][0]['title'])) . $spin_text[$spin] .' Chat Stickers' ; //[$post_id]; //[0]['url']; | |
echo '</br>'; |
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
#place in /etc/letsencrypt/renewal-hooks/post | |
export AWS_ACCESS_KEY_ID=XXX | |
export AWS_SECRET_ACCESS_KEY=XXX | |
#certs must be in us-east-1 to use with cloudfront | |
export AWS_DEFAULT_REGION=us-east-1 | |
#run without --certificate-arn first time then specify arn for updates | |
aws acm import-certificate --certificate file:///etc/letsencrypt/live/site.com/cert.pem --private-key file:///etc/letsencrypt/live/site.com/privkey.pem --certificate-chain file:///etc/letsencrypt/live/site.com/chain.pem --certificate-arn specifyarnforupdate |
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
const puppeteer = require('puppeteer'); | |
(async() => { | |
const browser = await puppeteer.launch({ | |
ignoreHTTPSErrors: true, | |
slowMo: 100, | |
headless: false, | |
args: ["--disable-notifications", "--ash-host-window-bounds 100+200-300x400"] | |
}); | |
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
let getMessageHash = function(hash, fn) { | |
dm.settings.log("getmessage hash", hash); | |
dm.rcmsg.get("m:"+ hash, function(err, data) { | |
if (err) { | |
dm.settings.log('message hash error', err); | |
} | |
if (!data) { | |
dm.settings.log("message hash not found?!", hash) |
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
var request = require("request"); | |
var fs = require("fs"); | |
var output = "#cloudfront ip ranges\n"; | |
request("https://ip-ranges.amazonaws.com/ip-ranges.json", function(err, res, body) { | |
if (err) { | |
console.error("error", err); | |
} | |
var j = JSON.parse(body); | |
j.prefixes.forEach(function(item) { | |
if (item.service ==='CLOUDFRONT') { |
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
/** | |
* | |
* Campaign Budget Overspend Monitoring | |
* | |
* This script labels campaigns whose spend today is more than their daily | |
* budgets. Optionally, it also pauses campaigns whose spend exceeds the | |
* budget by too much. An email is then sent, listing the newly labelled | |
* and paused campaigns. | |
* When spend no longer exceeds budget, the campaigns are reactivated and | |
* labels are removed. |
OlderNewer