8: meBot [code]


//funtions used (in order):
//searchIt (searches for a term among recent tweets)
//randomTweetGenerator (includes r value and number output)
//followedMe (mentions people who follow, random intervals)
//mentionsMe (replies when someone @iamlittleprick)



console.log('meBot is working today');

var Twit = require('twit');
var config = require('./config');
var T = new Twit(config);


//begin searchIt funtion
setInterval(searchIt, 1000*60*60);
searchIt();

function searchIt(){
  var searches = {
    q: 'new media art',
    count: 1,
    lang: 'en'
  }
  // dev.twitter.com and get search/statuses

  T.get('search/tweets', searches, getSearches);

  function getSearches(err, data, response){
    var tweets = data.statuses;
    if (tweets != undefined) {
      for (var i = 0; i < tweets.length; i++){
      console.log("HERE'S WHAT THEY RECENTLY SAID ABOUT NEW MEDIA ART: " + tweets[i].text);
      }
    }
  }
}
//end searchIt function



//THIS ONE tweets randomly, with a random number
//begin randomTweetGenerator function
// randomTweetGenerator();
// var r2 = Math.floor(Math.random()*5;
// setInterval(randomTweetGenerator, 1000*60); //how often to tweet
//1000ms=1sec *60=1min *60=1hr
randomTweetGenerator();

var rr = Math.floor(Math.random()*(53));
setInterval(randomTweetGenerator, 1000*60*rr);

function randomTweetGenerator(){

  var begin = [
  "i've been thinking about getting",
  "i'd really like",
  "thinking about",
  "lusting over"
  ];

  var noun = [
    "cookies",
    "stickers",
    "friends",
    "dollars",
    "followers",
    "flowers",
    "teacups",
    "vacations",
    "kittens",
    "cats",
    "t-shirts",
    "stickers",
    "boardgames",
    "balls of yarn",
  ];

  var end = [
    "today.",
    "in the near future.",
    "right now.",
    "soon.",
    "with a friend.",
    "for you.",
    "for myself. #treatYoSelf"
  ]

 var codingHashtags = [
    "#coderProblems",
    "#codingThisBitch",
    "#programmerProblems",
    "#syntaxError",
    "#turnDownForWhat",
    "#goOutside",
  ];

  var nostalgicHashtags = [
    "#eveninmydreams",
    "#imnotevenjoking",
    "#nostalgic",
    "#thegoodoldays",
    "#thinkingTooMuch"
  ];

  var boredHashtags = [
    "#indecisive",
    "#bored",
    "#dontknowwhattodo",
    "#idontknow"
  ];


  begin1 = begin[Math.floor(Math.random()*begin.length)];
  noun1 = noun[Math.floor(Math.random()*noun.length)];
  end1 = end[Math.floor(Math.random()*end.length)];

  codingHashtags1 = codingHashtags[Math.floor(Math.random()*codingHashtags.length)];
  nostalgicHashtags1 = nostalgicHashtags[Math.floor(Math.random()*nostalgicHashtags.length)];
  boredHashtags1 = boredHashtags[Math.floor(Math.random()*boredHashtags.length)];

  var r = Math.floor(Math.random()*50) + 2;

  var myRandomTweet = [
    "i've thought about you " + r + " times since my last tweet. " + nostalgicHashtags1,
    "i've been coding a lot lately, and i'm currently averaging " + r + " EPH (expletives per hour). " + codingHashtags1,
    "i've wanted to go outside " + r + " times since my last tweet. alas, i sit under the fluorescents. " + codingHashtags1,
    begin1 + " " + r + " " + noun1 + " " + end1,
    begin1 + " " + noun1,
    "every once in a while i ask this question, and it's just to get to know you all a little better. here's the question: how did you stumble upon my account? #hideandseek",
    "what should i do tomorrow? " + boredHashtags1,
    "what should i do today? " + boredHashtags1,
    "what should i do this weekend? " + boredHashtags1,
    "hi :)"
    ];

  myRandomTweet1 = myRandomTweet[Math.floor(Math.random()*myRandomTweet.length)];


  console.log("....... randomTweetGenerator started");

    var replyTweet = {
      status: myRandomTweet1
    }

    T.post('statuses/update', replyTweet, replyTweeted);

    function replyTweeted(err, data, response){
      if (err){
      console.log("oh, nos... error on randomTweetGenerator tweet");
      }else{
      console.log("....... randomTweetGenerator posted " + myRandomTweet1);
      }
    }
} //end of randomTweetGenerator function





//THIS FUNCTION is anytime someone follows me
//begin followedMe function

var streamFollow = T.stream('user');

streamFollow.on('follow', followedMe);


function followedMe(eventMsg){
  var name = eventMsg.source.name;
  var screenName = eventMsg.source.screen_name;
  var followedReply = [
    "how are you?",
    "what are you up to?",
    "what's up?",
    "thanks for the follow!",
    "thanks for the follow!!",
    "thanks for the follow! :)",
    "where are you from?",
    "what brings you around these parts?",
    "how did you stumble upon my account?",
    "what do you like to do for fun?",
    ":)",
    ":) :) :)",
    "thanks for following me :)",
    "thanks for following :)",
    "thanks for the follow",
    "followed me! yay! :)"
  ];

  var followedReplyBegin = [
    "hi ",
    "hi! ",
    "hi, ",
    "",
    "",
    "",
    "",
    "",
    "",
    "hey, it's ",
    "well, hello there ",
    "look who we have here :) "

  ];

  var followedReply1 = followedReply[Math.floor(Math.random()*followedReply.length)];
  var followedReplyBegin1 = followedReplyBegin[Math.floor(Math.random()*followedReplyBegin.length)];

  console.log("....... followedMe // i've been followed by " + screenName);
  // tweetBack("hi @" + screenName + " " + reply1);

  function delayedTweetBack(s) {
    tweetBack(s);
  }

  var tweetString = followedReplyBegin1 + "@" + screenName + " " + followedReply1;

  var r = Math.floor(Math.random()*37);

  setTimeout(delayedTweetBack, (1000*60*r), tweetString);

  function tweetBack(txt){

    var replyTweet = {
    status: txt
    }

  T.post('statuses/update', replyTweet, replyTweeted);

    function replyTweeted(err, data, response){
      if (err){
        console.log("followedMe FAILED");
      }else{
        console.log("followedMe // " + tweetString);
      }
    }
  }
} //end of followed funtion




//THIS FUNTION IS: thanks for the mention
//begin mentionsMe

var streamMentions = T.stream('user');

streamMentions.on('tweet', mentionsMe);

function mentionsMe(eventMsg){
  // var fs = require('fs');
  // var json = JSON.stringify(eventMsg,null,2);
  // fs.writeFile("tweet.json", json);

  var replyto = eventMsg.in_reply_to_screen_name;
  var text = eventMsg.text;
  var from = eventMsg.user.screen_name;

  var reply = [
    "really?",
    "so....what are you up to?",
    "nice :)",
    "...um",
    "not today..",
    "i think so",
    "huh?",
    "i see..",
    "what do you think?",
    "yeah, same here",
    "only on wednesdays lol",
    ":)",
    "well, well, well...",
    "according to the prophecy",
    "yeah..",
    "of course",
    "i'm sorry",
    "oh, really??",
    "thanks",
    ":D",
    "i'm not so sure",
    "what are your thoughts?"
  ];

  var reply1 = reply[Math.floor(Math.random()*reply.length)];

  if (replyto === 'iamlittleprick'){
    console.log(from + " says: " + text);


    function delayedTweetBack(s) {
      tweetBack(s);
    }

    var tweetString = "@" + from + " " + reply1;

    var r = Math.floor(Math.random()*23);

    setTimeout(delayedTweetBack, (1000*60*r), tweetString);

    function tweetBack(txt){

      var replyTweet = {
      status: txt
      }

  T.post('statuses/update', replyTweet, replyTweeted);

    function replyTweeted(err, data, response){
      if (err){
        console.log("mentionsMe FAILED");
        }else{
        console.log("....... yay!! mentionsMe works");
      }
    }
  }
}
} //end of mentionsMe function

8: meBot

For the final project, I created a twitter bot. Now, this isn’t just any twitter bot — it’s me! You can follow my meBot on twitter at @iamlittleprick

I have too much going on to spend a bunch of time on social media, and often it’s just downright exhausting. However, I realize that being active on social media is important in how we network these days.

meBot is programmed to tweet like I would tweet, reply like I’d reply, and more! Check out the news segment featuring meBot:

If you’re curious as to how meBot is performing as far as not being noticeably a bot, here’s meBot’s current stats against other (real) people:

 

If you’re interested in checking out my meBot code, and other tidbits, see my next post.

0: hidden in plain sight

Recently, I noticed a new (at least to me) feature in Gmail regarding the inbox.

Most of the time, I rush through checking my email, so it’s interesting that I slowed down enough to notice this feature. When you hover over the inbox without clicking, a little arrow appears on the side. Arrows usually mean “I’m hiding something”, so I tried clicking on it to see what would happen.

What I found was a whole bunch of ways to organize your inbox. My favorite one puts all unread messages on the top. I have yet to try this, as I found it overwhelming to look at all of my unread (and old) messages. One day I’ll deal with them, and remember this inbox setting.

Now, this is an observe because of how this little arrow made me behave following its discovery. I proceeded to spend a good amount of time hovering over everything and clicking everything I could see in Gmail, just to find out if anything happened. I didn’t realize it had happened until I finished my quest. Imagine what they could do with the knowledge of how to control me like that…imagine how many other sets of data they’re collecting on us, or could collect on us in a similar manner.

6: mashed

I had a lot of fun with these mashups, and you can see mine below!

My very useful mashup is this Weather Page I created. This lays out the current weather from my two most visited weather forecast websites. Now I don’t need to check them both individually, and I can compare the information between the two sites with a quick glance. As a bonus, this mashup is located on a personal page, which I frequently use.

Another fun project  is my backgroundNoise website. This is a personal mashup for fun and in remembrance of times past. These video mashups actually started on the multiplier (it’s the last one on my list below). I liked the results so much that I figured out how to make it work on a personal website. The trickiest part was getting the middle video to be muted while the other two played.

 

I think I had way too much fun mashing videos together. I created 4 so far, with varying reasons behind each. Here are my mashups that are on the multiplier:

http://www.youtubemultiplier.com/5aaea5b62723b-mybrother-mysister-mylove.php
This Olympic brother-sister duo caught my attention this year, while the Rage video is something that I’ve seen before and lingers in my mind. For fun, I mashed these two together because they are both videos about family, but one shows familial love, while the other shows quite the opposite. I wanted to see what would happen. What I found most interesting was how the two videos were in sync. This led to some rather disturbing and intriguing overlaps with the video and sound. I think this is attributed to the formatting nature of the two videos — one is a newscast, which are undoubtedly formatted to the minute; the other is a documentary of sorts, which most likely also follows a format. The formatting doesn’t surprise me, but how close they both are to each other was a surprise.

http://www.youtubemultiplier.com/5aaeaa5e929db-trippinwiththeturpins.php
I read about this family in some smut magazine recently. While snooping around online, I found some videos of the children, and a news interview about them. This mashup is simply to bring more attention to the issue.

http://www.youtubemultiplier.com/5aaeb4aa4eb19-justwatchitalreadyok.php
I stumbled upon the first video of the children and thought it could use a little background music. A quick search later, and I found the gem on the right. I think they play well together, and music adds a little more drama to the interview of the children.

http://www.youtubemultiplier.com/5aaeb36cc7b61-outoutoutoutoutoutoutout.php
This is the same thing as the backgroundNoise website, but it’s on the multiplier. I started on the multiplier, liked the results, and then figured out how to make it work on a personal website.

5: anonymously speaking

I created an extension called Anonymously Speaking, which replaces author names with “By: Anonymous”. I wanted to see how news intake was affected when the author names were obscured.

I don’t read through news sites myself, so I left it up to Google to tell me what sites to start fishing for. I was targeting the css classes, as I found that most of the author names were coded with pretty particular classes, such as .author, .byline, and other similar names.

0: silent but deadly

My observe deals with the automatic video playing that I find on facebook and instagram. When scrolling through a feed, the videos begin silently playing. I found that even if I wasn’t pulled in by the static image at first, when it became “moving”, I suddenly became more interested in the story.

A picture is worth a thousand words, but moving pictures tell a story. As I’m scrolling, I only get a second or two in the clip before I potentially scroll past, but I found that this is just enough time to hook me. In just a second or two, the story begins to unfold.

The silent aspect of the video adds to the hook. It makes me think that I get to choose whether to hear the audio or not, but it’s actually about me not being in the know. I can see the kids giggling, I can see people talking, I can see things that need to make sound, but I’m restricted. Facebook says “no, don’t hear this” and my mind says “why not?”.

Initially I thought that the silent video was a nice feature, which surpasses the current auto-loading videos which blast their audio content without concern, but now I’m not so sure. Facebook doesn’t seem to change (or do) anything unless is 1) benefits them and 2) uses psychology against (maybe even for??) us. I’m irritated by auto-loaded videos which blast their audio, but I more than tolerate the silent auto-loaded videos. In fact, I’m more likely to watch a silent auto-load than an audible auto-load. I think facebook (also read: instagram, snapchat, etc) knows that.

5: ideas

Here are 8 things I came up with for our REPLACE project:

1. Replace authors/sources with “anonymous”
Does a message become less convincing when you don’t know the source?

2. Replace all the periods with exclamation points.
How exciting could things get?

3. Replace all links with fake links that don’t click.
Take some time to really look at the page you’re on.

4. Replace all pronouns with their opposite.
Would this highlight an imbalance in gender representation?

5. Replace a name with a different one.
What would it look like if Obama spoke like Trump?

6. Replace first person pronouns with third person.
This is just for fun, I suppose.

7. On a news site, replace names and locations with those from kid shows.
How does this affect the message?

8. Replace actual country names with really stereotypical names.
Can you still tell what the story is about? If so, how does that feel being able to correctly identify a country based on its stereotype?

0: statistically speaking

Etsy is a creative marketplace, which is similar to Ebay, but it differs in that Etsy is more geared towards handmade and vintage items (they actually have pretty strict listing requirements). Generally speaking, if you make it, you can sell it on Etsy. I make (way too many) things, so I set up a shop on Etsy to see if I could make a buck or two.

Etsy sellers can download a mobile app to help manage all most things Etsy. One useful (but addicting) feature of the mobile selling app is that a seller can keep track of visitor statistics.

When I downloaded the app, it took me a while to get used to the interface. It’s not my cup of tea in the UI/UX department, but I like the idea of being able to post and manage my listings from my phone so I keep it around.

This statistics page is the main screen when you load the Etsy Seller App. If your stats go down, you can immediately see it. While discouraging at first, the immediate visual of the stats going down is more of an incentive to work more on your shop.

Higher stats (more site and listing visits) usually means more money for you, which also means more money for Etsy. It’s easy to see why Etsy want this visual to be your main focus. If you work harder (post more items, etc), you make Etsy more money. Now, that’s not to say that Etsy is just sitting back collecting checks, but it is a little more of a passive income stream towards Etsy.

4: can’t judge a book by its cover

This little code is used to remove all the images of the products on the amazon website so that people literally can’t judge a book by its cover. This script works best when supplemented with an ad blocker (otherwise the pictures just end up appearing in the ad space).

 


// ==UserScript==
// @name Can't Judge a Book by its Cover
// @version 1.0
// @namespace nikyreynolds.com
// @description This erases all images from amazon.com so that you don't judge a book by its cover. Works best when supplemented with an ad blocker.
// @require http://arts445.courses.bengrosser.com/files/ready-vanilla.js
// @require http://code.jquery.com/jquery-3.3.1.min.js
// @run-at document-start
//
// @match *://*.amazon.com/*
// @include *://*.amazon.com/*
// @exclude *://*.amazon.com/ai.php*
// @exclude *://*.amazon.com/ajax/*
// @exclude *://*.amazon.com/dialog/*
// @exclude *://*.amazon.com/connect/*
// ==/UserScript==// -----------------------------------------

(function() {

var j;

function main() {

<%%KEEPWHITESPACE%%>    j = jQuery.noConflict();

<%%KEEPWHITESPACE%%>    j('img, #imgTagWrapperId, .block, .sky').each(function() { hideElement(this); }); // hides images

<%%KEEPWHITESPACE%%>    ready('img, #imgTagWrapperId, .block, .sky', function(e) { hideElement(e); }); // hides images

<%%KEEPWHITESPACE%%>    function hideElement(e) { j(e).hide(); }
}

main();

String.prototype.contains = function(it) { return this.indexOf(it) != -1; };

})();

tampermonkey fun



// ==UserScript==
// @name         First Userscript
// @namespace    nikyreynolds.com
// @version      0.1
// @description  read through wikipedia without all the distraction
// @author       Niky
// @match        https://en.wikipedia.org/*
// @grant        none
// @require http://code.jquery.com/jquery-latest.js
// ==/UserScript==



(function() {
    'use strict';

    // Your code here...

    var j = jQuery.noConflict();


   setInterval (OnOff, 2000);

    function OnOff() {
  

    j('#mw-head, #mw-head-base, #mw-page-base').fadeOut(1000);
    j('#p-logo').fadeOut(2000);
    j('table').fadeOut(2200);
    j('li').fadeOut(2500);
    j('#toc, .thumbcaption, .thumbinner').fadeOut(3000);
    j('b').fadeOut(4000);
    j('h3').fadeOut(4100);
    j('h2').fadeOut(4200);
    j('h1').fadeOut(4300);
    j('a').fadeOut(4500);
    j('.ul, .portal').fadeOut(5000);

    }



})();


4: ideas

  1. remove all instances of he, she, him, her, etc.
  2. remove all pictures
  3. remove all words
  4. remove all headlines
  5. remove all headlines unless they have a keyword in them
  6. remove search bars
  7. remove the prices of things on shopping sites
  8. remove all punctuation

 

fade in, fade out


// ==UserScript==
// @name         First Userscript
// @namespace    nikyreynolds.com
// @version      0.1
// @description  try to take over the world!
// @author       Niky
// @match        https://www.w3schools.com/*
// @grant        none
// @require http://code.jquery.com/jquery-latest.js
// ==/UserScript==

(function() {
<%%KEEPWHITESPACE%%>    'use strict';

<%%KEEPWHITESPACE%%>    // Your code here...

<%%KEEPWHITESPACE%%>    // hide, show, fadeIn, fadeOut, css
<%%KEEPWHITESPACE%%>    // class, ID, contains

<%%KEEPWHITESPACE%%>    var j = jQuery.noConflict();
<%%KEEPWHITESPACE%%>    j('a').css('border','1px solid red');
<%%KEEPWHITESPACE%%>    j('.w3-bar-item:contains("Learn")').hide();

<%%KEEPWHITESPACE%%>   setInterval (OnOff, 2000);

<%%KEEPWHITESPACE%%>    function OnOff() {
<%%KEEPWHITESPACE%%>    j('h1').fadeOut(1234);
<%%KEEPWHITESPACE%%>    j('h1').fadeIn(1564);
<%%KEEPWHITESPACE%%>    j('h2').fadeOut(4242);
<%%KEEPWHITESPACE%%>    j('h2').fadeIn(4242);
<%%KEEPWHITESPACE%%>    j('h3').fadeOut(3000);
<%%KEEPWHITESPACE%%>    j('h3').fadeIn(2000);
<%%KEEPWHITESPACE%%>    }

})();

0: we see you see us see you

They saw me, and then they told me they saw me. We all know by now that all of our actions online are tracked, but this graphic seemed like they were mocking me. Yeah they see me, but what am I really going to do about it?

I don’t know if this is supposed to be a friendly gesture, like a friend shopping with you and giving you a nudge about a deal on something you saw, but it creeped me out. This is definitely making me rethink my browsing habits. All in all, they’re inadvertently causing me to not want to use the internet (read: their services) anymore.

3: ADDicting

#1

j('h2').append('ICTED to jQuery');
j('p:contains("existing")').prepend('If you really feel like it, you can do this project. Start by finding that super long jQuery code on my page. You should know where this is already. ');
j('p:contains("meaning")').append(' Try to find a meaning beyond "I just thought it would be fun".');
j('p:contains("permanent")').append("&amp;amp;amp;amp;lt;br&amp;amp;amp;amp;gt;&amp;amp;amp;amp;lt;br&amp;amp;amp;amp;gt;You've got this.");

Click here to visit the page and try it yourself!


#2

j('li:contains("stress")').append(' with contracted murder.');
j('li:contains("more")').append(' with kidnapping.');
j('li:contains("relationships")').append(' with your slaves.');
j('li:contains("marriage")').append(' with yourself.');
j('li:contains("happy")').append(' when they hate you.');
j('li:contains("better")').append(' brainwashing skills.');
j('li:contains("communication")').append(' during intercourse.');
j('li:contains("Dianetics")').append(' while aboard Freewinds.');
j('li:contains("Spiritual")').append(' without technology.');
j('li:contains("Program")').append(" (what we don't want you to know).");

Click here to visit the page and try it yourself!

You’ll need to click the “FIND OUT” button first.


#3

j("p").prepend("As the prophecy foretold! ");
j("p").append("!!");
j("b").append("izzle4Rizzle");
j("p:contains('@')").append(" But the real tragedy is the poor widdle babies who cry in their mama's wap. Boo hoo. Suck it up and grow a pair.");

Click here to visit the page and try it yourself!


#4

j("a:contains('Aaron'), a:contains('Joseph')").prepend("Chief ");
j("a:contains('Aaron'), a:contains('Joseph')").append("wek");
j("a:contains('News')").prepend("Fake ");
j("a:contains('Top')").append(" According to Us");
j("a:contains('Showcase')").prepend("Slut ");
j("a:contains('Orange')").prepend("Fail ");
j("p:contains('By')").prepend("These Stories Were Made Up ");21

Click here to visit the page and try it yourself!

Try this! :)

Go the the Etsy homepage, and make some yellow borders around the images under the categories shown below. Make sure it’s a single border, not multiple borders. Notice, it’s also not a thin border (but the borders around the images are all the same thickness).