Skip to content

Instantly share code, notes, and snippets.

# coding=utf-8
from os import path
from time import sleep
from urllib.request import urlopen
from datetime import datetime
from smtplib import SMTP
from bs4 import BeautifulSoup
DEBUG_TAG = '[{name}]'.format(name=path.basename(__file__))
IP_LOOKUP_URL = 'http://whatismyip.org'
:: Guides and examples can be found at:
:: http://forums.guru3d.com/showthread.php?t=356046
:: Script needs to be set as a system startup batch file with the highest priority and system privilages to work correctly.
:: Init the ramdrive (6GB) in physical memory and format it as ntfs
imdisk -a -s 6G -m R: -p "/fs:ntfs /q /y" -o awe
:: add a page file starting with 96MB and expands to 1536M
swapadd R:\pagefile.sys 96M 1536M
namespace ServicesTool2.ViewModel
{
using System;
using System.DirectoryServices.AccountManagement;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Input;
using GalaSoft.MvvmLight;
using GalaSoft.MvvmLight.CommandWpf;
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<title>TypeScript HTML App</title>
<link rel="stylesheet" href="app.css" type="text/css"/>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.4/jquery.min.js"></script>
<script src="https://code.createjs.com/easeljs-0.8.1.min.js"></script>
<script src="app.js"></script>
@yareally
yareally / app.ts
Last active September 4, 2015 14:33
/// <reference path="scripts/typings/easeljs/easeljs.d.ts"/>
/// <reference path="scripts/typings/jquery/jquery.d.ts"/>
class Circle {
circleShape: createjs.Shape;
/**
*
* @param x
* @param y
[URL]
Protocol=unreal
Name=Player
Map=MenuMap.umap
LocalMap=MenuMap.umap
TransitionMap=ExampleEntry.umap
MapExt=umap
EXEName=WillowGame.exe
DebugEXEName=DEBUG-WillowGame.exe
SaveExt=usa
@RunWith(classOf[JUnitRunner])
class ApplicationSpec extends Specification {
"Application" should {
"send 404 on a bad request" in new WithApplication{
route(FakeRequest(GET, "/boum")) must beNone
}
"render the index page" in new WithApplication{
def launchTestingSettings(activity: FragmentActivity) {
try {
activity.startActivity(AppHelpers.getAdditionalSettings)
}
catch {
case ignored: Any ⇒
val result = TerminalCommands.launchActivity("com.android.settings", "TestingSettings")
result.onComplete { case c ⇒
if (c.getOrElse(1) != 0) new NoSupportDialog().show(activity.getSupportFragmentManager, "Sorry")
@yareally
yareally / DbHelpers.scala
Created May 6, 2015 03:11
Scala Slick testing on Android
package com.cc.AndroidSlick
import java.sql.{Driver, DriverManager}
import android.app.Activity
import android.media.MediaScannerConnection
import android.util.Log
import slick.profile.SqlProfile.ColumnOption.NotNull
import scala.concurrent.Await
import scala.concurrent.ExecutionContext.Implicits.global
import scala.concurrent.duration._
package com.cc.signalinfo.util
import android.app.Activity
import android.os.Bundle
import android.support.v4.app.LoaderManager.LoaderCallbacks
import android.support.v4.content.Loader
import android.view.View
import android.view.View.OnClickListener
/**