Skip to content

Instantly share code, notes, and snippets.

View torstenfeld's full-sized avatar

Torsten Feld torstenfeld

View GitHub Profile
$scope.scanCode = function () { // Scan code
$ionicLoading.show({
template: '<ion-spinner></ion-spinner>'
});
console.log("scanCode run");
if ($scope.currentlyScanning === true) {
$ionicLoading.hide();
return;
}
else if (ionic.Platform.platforms.indexOf("browser") !== -1) {
@fnielsen
fnielsen / Nielsen2012Python_case.py
Last active April 29, 2020 23:49
Text mining example in Python
# $Id: Nielsen2012Python_case.py,v 1.2 2012/09/02 16:55:25 fn Exp $
# Define a url as a Python string (note we are only getting 100 documents)
url = "http://wikilit.referata.com/" + \
"wiki/Special:Ask/" + \
"-5B-5BCategory:Publications-5D-5D/" + \
"-3FHas-20author%3DAuthor(s)/-3FYear/" + \
"-3FPublished-20in/-3FAbstract/-3FHas-20topic%3DTopic(s)/" + \
"-3FHas-20domain%3DDomain(s)/" + \
"format%3D-20csv/limit%3D-20100/offset%3D0"
<?php
$urlString = 'http://pshmn.com/eaFnY';
$handle = @fopen($urlString, 'r');
if (!$handle) {
// log error
}
@fclose($handle);
?>
@pushmon
pushmon / gist:1886151
Created February 22, 2012 17:18
AutoIt
Dim $urlString = "http://pshmn.com/eaFnY";
InetGet($urlString, "~ping.tmp")
If @error <> 0 Then
; log error
EndIf
@oodavid
oodavid / README.md
Last active April 6, 2024 18:45 — forked from aronwoost/README.md
Deploy your site with git

Deploy your site with git

This gist assumes:

  • you have a local git repo
  • with an online remote repository (github / bitbucket etc)
  • and a cloud server (Rackspace cloud / Amazon EC2 etc)
    • your (PHP) scripts are served from /var/www/html/
    • your webpages are executed by apache
  • apache's home directory is /var/www/
@karmi
karmi / .gitignore
Created November 27, 2010 16:26
`tail -f` in Node.js and WebSockets
.DS_Store
*.log
tmp/