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
/** | |
* Round Link | |
*/ | |
a.round:link, a.round:visited { | |
width: 140px; | |
color: #fff; | |
font: 28px/30px Arial; | |
text-transform: uppercase; | |
text-shadow: #6f0909 0 -1px 1px; | |
border: 1px solid #6F0909; |
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
$('a[href^="#"]').bind('click.smoothscroll',function (e) { | |
e.preventDefault(); | |
var target = this.hash, | |
$target = $(target); | |
$('html, body').stop().animate({ | |
'scrollTop': $target.offset().top | |
}, 500, 'swing', function () { | |
window.location.hash = target; |
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
/** | |
* CSS3 Cool 3-states Buttons | |
*/ | |
ul { list-style: none; } | |
a.button { | |
display: block; | |
float: left; | |
position: relative; | |
height: 25px; | |
width: 80px; |
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
//Convert a hex value to its decimal value - the inputted hex must be in the | |
// format of a hex triplet - the kind we use for HTML colours. The function | |
// will return an array with three values. | |
function hex2num(hex) { | |
if(hex.charAt(0) == "#") hex = hex.slice(1); //Remove the '#' char - if there is one. | |
hex = hex.toUpperCase(); | |
var hex_alphabets = "0123456789ABCDEF"; | |
var value = new Array(3); | |
var k = 0; | |
var int1,int2; |
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.BufferedReader; | |
import java.io.ByteArrayInputStream; | |
import java.io.File; | |
import java.io.FileInputStream; | |
import java.io.IOException; | |
import java.io.InputStream; | |
import java.io.InputStreamReader; | |
import java.io.OutputStream; | |
import java.io.PrintStream; | |
import java.io.PrintWriter; |
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 | |
#Twitter status update bot by http://360percents.com | |
#Author: Luka Pusic <[email protected]> | |
#REQUIRED PARAMS | |
username="[email protected]" | |
password="yourpassw0rd" | |
tweet="$*" #must be less than 140 chars | |
#EXTRA OPTIONS |
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.BufferedReader; | |
import java.io.ByteArrayInputStream; | |
import java.io.File; | |
import java.io.FileInputStream; | |
import java.io.IOException; | |
import java.io.InputStream; | |
import java.io.InputStreamReader; | |
import java.io.OutputStream; | |
import java.io.PrintStream; | |
import java.io.PrintWriter; |
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 boolean isNetworkAvailable() { | |
Context context = getApplicationContext(); | |
ConnectivityManager connectivity = (ConnectivityManager) context.getSystemService(Context.CONNECTIVITY_SERVICE); | |
if (connectivity == null) { | |
boitealerte(this.getString(R.string.alert),"getSystemService rend null"); | |
} else { | |
NetworkInfo[] info = connectivity.getAllNetworkInfo(); | |
if (info != null) { | |
for (int i = 0; i < info.length; i++) { | |
if (info[i].getState() == NetworkInfo.State.CONNECTED) { |
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.*; | |
import java.util.*; | |
import java.net.*; | |
/** | |
* An smart MP3/OGG HTTP server that translates M3U playlist files | |
* | |
* <p> Mp3HTTPD version 1.04, | |
* Copyright © 2001,2005 Jarno Elonen ([email protected]) |
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
try { | |
URL u = new URL("http://hanigamal.net/resume.pdf"); | |
HttpURLConnection c = (HttpURLConnection) u.openConnection(); | |
c.setRequestMethod("GET"); | |
c.setDoOutput(true); | |
c.connect(); | |
String fileName = Environment.getExternalStorageDirectory().getAbsolutePath(); | |
FileOutputStream f = new FileOutputStream(new File(fileName,"my.pdf")); |
OlderNewer