This file contains hidden or 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
| date -d @1208941833 +"%Y-%m-%d %H:%M:%S" | |
| # 2008-04-23 11:10:33 | |
| date +%s | |
| # 1208941833 |
This file contains hidden or 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
| CREATE VIEW V_UTIL_CONSTANTS AS | |
| SELECT 1 AS ONE, 2 AS TWO, 3 AS THREE | |
| SELECT ONE FROM V_UTIL_CONSTANTS |
This file contains hidden or 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 | |
| # Sleep sort | |
| # http://dis.4chan.org/read/prog/1295544154 | |
| function f() { | |
| sleep "$1" | |
| echo "$1" | |
| } |
This file contains hidden or 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
| telnet server.com 25 | |
| telnet-ssl server.com 465 | |
| HELO server.com | |
| MAIL FROM: <me@mine.com> | |
| RCPT TO: <you@your.com> | |
| RCPT TO: <he@your.com> | |
| DATA | |
| From: me@mine.com | |
| To: you@your.com |
This file contains hidden or 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
| dig +nocmd $DOMAIN MX +noall +answer | awk '{print $5 " " $6}' | sort -n | awk '{print substr($2,1,length($2)-1) " " $1 }' |
This file contains hidden or 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
| function stringHash(s) { | |
| var hash = 0, | |
| i = 0, | |
| char; | |
| if (s.length === 0) { | |
| return hash; | |
| } | |
| for (i = 0; i < s.length; i++) { | |
| char = s.charCodeAt(i); | |
| hash = 31*hash+char; |
This file contains hidden or 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
| USER='username' | |
| PASS='password' | |
| HOST='host' | |
| FOLD='folder' | |
| ftp -n $HOST > temp <<END_SCRIPT | |
| quote USER $USER | |
| quote PASS $PASS | |
| cd $FOLD | |
| ls | |
| quit |
This file contains hidden or 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
| public static void main(String[] args) throws SocketException { | |
| Enumeration<NetworkInterface> networks = NetworkInterface.getNetworkInterfaces(); | |
| NetworkInterface inter; | |
| while (networks.hasMoreElements()) { | |
| inter = networks.nextElement(); | |
| byte[] mac = inter.getHardwareAddress(); | |
| if (mac != null) { | |
| for (int i = 0; i < mac.length; i++) { | |
| System.out.format("%02X%s", mac[i], (i < mac.length - 1) ? "-" : ""); | |
| } |
This file contains hidden or 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
| import java.io.File; | |
| import java.io.FileInputStream; | |
| import java.util.List; | |
| import java.util.Properties; | |
| import javax.activation.DataHandler; | |
| import javax.activation.DataSource; | |
| import javax.activation.FileDataSource; | |
| import javax.mail.Address; | |
| import javax.mail.Message; |
This file contains hidden or 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
| public class DownTo { | |
| public static void main(String[] arc) { | |
| for (int i = 20; i --> 0;) { | |
| // i-- > 0 | |
| System.out.println("ok: "+i); | |
| // prints 19, 18, 17... 0 | |
| } | |
| } | |
| } |
OlderNewer