Skip to content

Instantly share code, notes, and snippets.

@itsJarrett
Last active September 21, 2016 13:22
Show Gist options
  • Save itsJarrett/a423338351aa39e698ad to your computer and use it in GitHub Desktop.
Save itsJarrett/a423338351aa39e698ad to your computer and use it in GitHub Desktop.
Instagram Name Effect
package com.ibJarrett.instagramnameeffect;
import java.io.IOException;
public class Main {
public static void main(String args[]) {
while (true)
marqueeText();
}
public static void marqueeText() {
StringBuilder name = new StringBuilder("Jarrett+B.");
StringBuilder newname = new StringBuilder("----------");
try {
for (int i = 0; i < name.length(); i++) {
newname.setCharAt(i, name.charAt(i));
Thread.sleep(5000);
ProcessBuilder p = new ProcessBuilder("curl", "")
System.out.println(newname);
try {
p.start();
} catch (IOException e) {
e.printStackTrace();
}
}
Thread.sleep(60000);
newname = new StringBuilder("----------");
for(int i = name.length(); i-- > 0;) {
newname.setCharAt(i, name.charAt(i));
Thread.sleep(5000);
ProcessBuilder p = new ProcessBuilder("curl", "")
System.out.println(newname);
try {
p.start();
} catch (IOException e) {
e.printStackTrace();
}
}
} catch (InterruptedException ex) {
Thread.currentThread().interrupt();
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment