Skip to content

Instantly share code, notes, and snippets.

@davharris
Last active August 29, 2015 14:10
Show Gist options
  • Save davharris/0c859b69de0207fffc91 to your computer and use it in GitHub Desktop.
Save davharris/0c859b69de0207fffc91 to your computer and use it in GitHub Desktop.
#Based on https://github.com/robotlolita/fuck-you
# and https://en.wikipedia.org/wiki/Transformation_of_text
screw_you = function(x){
chars = strsplit(paste0(c(" ", rev(letters), rev(LETTERS), 0, 9:1, "&_?!\".';'"), collapse = ""), "")[[1]]
flipped = strsplit(
" zʎxʍʌnʇsɹbdouɯlʞɾıɥɓɟǝpɔqɐZ⅄XMΛ∩⊥SᴚΌԀONW⅂⋊ſIH⅁ℲƎᗡƆ𐐒∀068ㄥ9ގㄣƐᘔ⇂⅋‾¿¡„,˙'؛",
"")[[1]]
split = strsplit(as.character(substitute(x)), "")[[1]]
out = paste0(
"(╯°□°)╯",
paste0(flipped[rev(match(split, chars))], collapse = "")
)
message(out)
}
@davharris
Copy link
Author

Example usage:

> screw_you(stringsAsFactors)
(╯°□°)╯sɹoʇɔɐℲs∀sɓuıɹʇs

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment