I hereby claim:
- I am justingarrick on github.
- I am justingarrick (https://keybase.io/justingarrick) on keybase.
- I have a public key ASC_8zy9brmRYPOEoHnrNjfxlD26cnJLoYqlYtK1-FlZfQo
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
import subprocess | |
def looksLikeBeginning(doc,seg,adr): | |
if doc.is64Bits() and seg.readByte(adr) == 0x55 and seg.readByte(adr + 1) == 0x48 and seg.readByte(adr + 2) == 0x89 and seg.readByte(adr + 3) == 0xE5: | |
return True | |
if not doc.is64Bits() and seg.readByte(adr) == 0x55 and seg.readByte(adr + 1) == 0x89 and seg.readByte(adr + 2) == 0xE5: | |
return True | |
return False | |
doc = Document.getCurrentDocument() |
This assumes Postgres is installed via Postgres.app | |
1) Setup a PGDATA environment variable in ~/.zshrc, e.g. | |
### PostgreSQL data | |
export PGDATA="/Users/justingarrick/Library/Application Support/Postgres/var-9.3" | |
2) In $PGDATA/postgresql.conf, add | |
listen_addresses = '*' | |
3) In $PGDATA/pg_hba.conf, add |
Create a method like the following: | |
/** | |
* Fix https://github.com/square/okhttp/issues/184 | |
* | |
* @return an unfucked OkHttpClient for use with a RestAdapter | |
*/ | |
public static OkClient createClient() { | |
OkHttpClient client = new OkHttpClient(); | |
SSLContext sslContext; |
//Add | |
//Request.Content.ReadAsStreamAsync().ContinueWith(t => t.Result.Seek(0, SeekOrigin.Begin)).Wait(); | |
//to your POST method, e.g. | |
[AntiForgeryToken] | |
public WeldProjectInfo Post([FromBody]RequestDetail details) | |
{ | |
try | |
{ | |
Request.Content.ReadAsStreamAsync().ContinueWith(t => t.Result.Seek(0, SeekOrigin.Begin)).Wait(); |
In your Windows 7/8 VM, go to Control Panel
> System
> Advanced system settings
> Computer Name
and click Change
. Name this whatever you like, e.g. windows. Restart your VM.
Open CMD or Powershell as administrator. Add a URL ACL entry for your new name on the port of your choice, e.g.
netsh http add urlacl url=http://windows:8080/ user=everyone
USE [master] | |
DECLARE @dbName NVARCHAR(MAX) | |
SET @dbName ='Derp' -- Your DB name here | |
DECLARE @sql NVARCHAR(MAX) | |
DECLARE @template NVARCHAR(MAX) | |
DECLARE @dataDir NVARCHAR(MAX) | |
SET @dataDir = (SELECT SUBSTRING(physical_name, 1, CHARINDEX(N'master.mdf', LOWER(physical_name)) - 1) FROM master.sys.master_files WHERE database_id = 1 AND file_id = 1) |
using System; | |
using System.Collections.Generic; | |
using System.Drawing; | |
using System.IO; | |
using System.Linq; | |
using System.Text; | |
using MyProject.Domain; | |
using EO.Pdf; | |
using EO.Pdf.Acm; |
1.* Delete all traces of Java 6. Look under /Library/Java/JavaVirtualMachines and /System/Library/Java/JavaVirtualMachines | |
2. Install JDK7 via the .dmg from Oracle, it should install to /Library/Java/JavaVirtualMachines | |
3. Symlink JDK7 to JDK6 to "trick" OS X into thinking we have Java 6 installed for applications that require it: | |
$ sudo mkdir /System/Library/Java/JavaVirtualMachines | |
$ sudo ln -s /Library/Java/JavaVirtualMachines/jdk1.7.0_21.jdk /System/Library/Java/JavaVirtualMachines/1.6.0.jdk | |
4.** Set JAVA_HOME. You can't just set this in your ~/.bashenv or ~/.zshenv files, because the m2e plugin in Eclipse isn't aware of those unless you start Eclipse from the command line. You need to add it to /etc/launchd.conf: | |
$ sudo touch /etc/launchd.conf |
HotKeySet("{DEL}", "stop") | |
Opt("MouseCoordMode", 0) | |
$i = 0 | |
$i2 = 0 | |
WinActivate("Diablo II") | |
WinWaitActive("Diablo II") | |
Do | |
$i = $i + 1 |