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
Show hidden characters
{ | |
// "color_scheme": "Packages/Color Scheme - Default/Dawn.tmTheme", | |
"color_scheme": "Packages/Theme - Brogrammer/brogrammer.tmTheme", | |
"fade_fold_buttons": true, | |
"find_selected_text": true, | |
"font_face": "Consolas", | |
"font_options": | |
[ | |
"subpixel_antialias", | |
"gray_antialias" |
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
def magti_send_sms(sms, mobile): | |
cookie_jar = cookielib.CookieJar() | |
opener = urllib2.build_opener(urllib2.HTTPCookieProcessor(cookie_jar)) | |
urllib2.install_opener(opener) | |
url_1 = 'http://www.magtifun.ge/index.php?page=11&lang=ge' | |
values = dict(password='password', user='user', act='1') | |
data = urllib.urlencode(values) | |
req = urllib2.Request(url_1, data) | |
rsp = urllib2.urlopen(req) |
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 urllib,urllib2,cookielib | |
cookie_jar = cookielib.CookieJar() | |
opener = urllib2.build_opener(urllib2.HTTPCookieProcessor(cookie_jar)) | |
urllib2.install_opener(opener) | |
url_1 = 'http://www.magtifun.ge/index.php?page=11&lang=ge' | |
values = dict(password='Password', user='User', act='1') | |
data = urllib.urlencode(values) | |
req = urllib2.Request(url_1, data) |
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
milliseconds = 0; | |
timeHandle = null; | |
window.onkeypress = function(){ | |
clearInterval(timeHandle); | |
if (milliseconds > 0){ | |
console.log('passed ' + milliseconds*10 + ' milliseconds'); | |
milliseconds = 0; | |
} | |
timeHandle = setInterval(function(){ | |
milliseconds++; |
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
/** | |
* given expression | |
*/ | |
var run = function(){ | |
var arr = []; | |
for(var i = 0; i<=10; i++){ | |
arr.push(function(){ |
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
vendor(name, argument) { | |
-webkit-{name} argument | |
-moz-{name} argument | |
-ms-{name} argument | |
-o-{name} argument | |
{name} argument | |
} | |
border-radius() | |
vendor('border-radius', arguments) | |
background-image() |
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 hasFlash(){ | |
var hasFlash = false; | |
try { | |
hasFlash = Boolean(new ActiveXObject('ShockwaveFlash.ShockwaveFlash')); | |
} catch(exception) { | |
hasFlash = ('undefined' != typeof navigator.mimeTypes['application/x-shockwave-flash']); | |
} | |
return hasFlash; | |
} |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>Canvas</title> | |
</head> | |
<body> | |
<canvas id="canvas" width="800" height="600"></canvas> | |
<script type="text/javascript"> |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<title>Rotating Arc on canvas</title> | |
</head> | |
<body> | |
<canvas id="canvas" width="400" height="150"></canvas> | |
<script type="text/javascript" src="script.js"></script> | |
</body> |
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 RealPathUtil { | |
public static String getRealPath(Context context, Uri fileUri) { | |
String realPath; | |
// SDK < API11 | |
if (Build.VERSION.SDK_INT < 11) { | |
realPath = RealPathUtil.getRealPathFromURI_BelowAPI11(context, fileUri); | |
} | |
// SDK >= 11 && SDK < 19 | |
else if (Build.VERSION.SDK_INT < 19) { |
OlderNewer