Models | Examples |
---|---|
Display ads | Yahoo! |
Search ads |
This file contains 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 | |
// First we require the xml2json file of course. | |
require_once($modx->getOption('core_path').'components/simplx/common/xml2json.php'); | |
// xml2json simply takes a String containing XML contents as input. | |
// Remember that the preprocessor always get a parameter called $dataSet | |
// containing the complete dataSet recieved from the dataSourceUrl or the | |
// dataSet Snippet parameter. |
This file contains 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
#!/bin/sh | |
### | |
# SOME COMMANDS WILL NOT WORK ON macOS (Sierra or newer) | |
# For Sierra or newer, see https://github.com/mathiasbynens/dotfiles/blob/master/.macos | |
### | |
# Alot of these configs have been taken from the various places | |
# on the web, most from here | |
# https://github.com/mathiasbynens/dotfiles/blob/5b3c8418ed42d93af2e647dc9d122f25cc034871/.osx |
This file contains 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
[core] | |
# autocrlf = true/input # it should be done explicit using .gitattributes https://help.github.com/en/github/using-git/configuring-git-to-handle-line-endings | |
[pull] | |
rebase = true | |
[push] | |
default = current | |
[alias] | |
ls = log --pretty=format:"%C(yellow)%h%Cred%d\\ %Creset%s%Cgreen\\ [%an]" --decorate | |
lst = log --pretty=format:%C(yellow)%h%Cred%d\\ %Creset%s%Cgreen\\ [%an] --decorate -10 | |
lds = log --pretty=format:"%C(yellow)%h\\ %ad%Cred%d\\ %Creset%s%Cgreen\\ [%an]" --decorate --date=short |
This file contains 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
#!bin/bash | |
echo "Export your Gmail contacts as a CSV, name it contacts.csv, put it in this directory, press Enter" | |
read foo | |
wget --referer=https://forum.btcsec.com https://forum.btcsec.com/uploads/manual_09_2014/google_5000000.7z | |
echo "I haven't worked out a way to unzip .7z files from a cli yet... patches welcome" | |
echo "Press enter when you've unzipped the file" | |
read foo |
This file contains 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
/** | |
* @param {Function} fn Function to curry. | |
* @param {Number} lenght The arguments required to invoke the function. Optional. By default is fn.length | |
* @returns {Function} The currified function. | |
*/ | |
function curry(fn, length) { | |
length = length || fn.length; | |
return function currified() { | |
var args = [].slice.call(arguments); |
This file contains 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
(ns calc.core | |
(:require | |
[instaparse.core :as insta] | |
[clojure.pprint :refer [pprint]])) | |
; Define a parser: | |
(def parser | |
(insta/parser | |
" | |
<expr> = sum-expr |
This file contains 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
$regions = aws ec2 describe-regions --query Regions[*].[RegionName] --output text | |
foreach ($region in $regions) { | |
Write-Output "Terminating Instances in region: '$region'..." | |
aws configure set region $region | |
$ids = aws ec2 describe-instances --query "Reservations[*].Instances[*].{ID:InstanceId}" --output text --region $region | |
$idArray = $ids.Split([Environment]::NewLine) | |
foreach($id in $idArray) { | |
aws ec2 modify-instance-attribute --no-disable-api-termination --instance-id $id --region $region |