Last active
September 21, 2016 13:22
-
-
Save itsJarrett/a423338351aa39e698ad to your computer and use it in GitHub Desktop.
Instagram Name Effect
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
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