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
module AdsenseHelper | |
# Author: Tomasz Mazur ([email protected]) | |
# http://www.mydigitallife.info/2009/01/17/google-adsense-legacy-old-generation-code-reference-generate-and-get/ | |
# :slot | |
# :theme | |
# :background | |
# :border | |
# :link | |
# :text |
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
# Calculate a short checksum of the real hostname to determine a unique color | |
if [[ $TERM =~ "256color" ]]; then | |
host_color="38;5;$((16 + $(hostname | cksum | cut -c1-3) % 256))"; | |
else | |
host_color="1;$((31 + $(hostname | cksum | cut -c1-3) % 6))"; | |
fi |
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
require 'openssl' | |
key = OpenSSL::PKey::RSA.new(2048) | |
p encrypted_string = key.public_encrypt('my plaintext string', OpenSSL::PKey::RSA::PKCS1_OAEP_PADDING) | |
p decrypted_string = key.private_decrypt(encrypted_string, OpenSSL::PKey::RSA::PKCS1_OAEP_PADDING) |
Principles of Adult Behavior
- Be patient. No matter what.
- Don’t badmouth: Assign responsibility, not blame. Say nothing of another you wouldn’t say to him.
- Never assume the motives of others are, to them, less noble than yours are to you.
- Expand your sense of the possible.
- Don’t trouble yourself with matters you truly cannot change.
- Expect no more of anyone than you can deliver yourself.
- Tolerate ambiguity.
- Laugh at yourself frequently.
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
# Also @see https://www.viget.com/articles/protip-passing-parameters-to-your-rake-tasks for | |
# examples using dependents and default values for arguments (see the updates at the end) | |
# Avdi Grimm's rake tutorial is really helpful. His section on FileLists: | |
# @see http://www.virtuouscode.com/2014/04/22/rake-part-2-file-lists/ | |
# Rails: | |
# * to get access to Rails models, etc, your task must depend on the :environment task | |
# ex: task :my_task => :environment do .... |
Disclaimer: This piece is written anonymously. The names of a few particular companies are mentioned, but as common examples only.
This is a short write-up on things that I wish I'd known and considered before joining a private company (aka startup, aka unicorn in some cases). I'm not trying to make the case that you should never join a private company, but the power imbalance between founder and employee is extreme, and that potential candidates would
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
#!/usr/bin/env bash | |
# https://developers.supportbee.com/blog/setting-up-cucumber-to-run-with-Chrome-on-Linux/ | |
# https://gist.github.com/curtismcmullan/7be1a8c1c841a9d8db2c | |
# https://stackoverflow.com/questions/10792403/how-do-i-get-chrome-working-with-selenium-using-php-webdriver | |
# https://stackoverflow.com/questions/26133486/how-to-specify-binary-path-for-remote-chromedriver-in-codeception | |
# https://stackoverflow.com/questions/40262682/how-to-run-selenium-3-x-with-chrome-driver-through-terminal | |
# https://askubuntu.com/questions/760085/how-do-you-install-google-chrome-on-ubuntu-16-04 | |
# Versions | |
CHROME_DRIVER_VERSION=`curl -sS https://chromedriver.storage.googleapis.com/LATEST_RELEASE` |
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 | |
gdb -p "$1" -batch -ex 'set {short}$rip = 0x050f' -ex 'set $rax=231' -ex 'set $rdi=0' -ex 'cont' |