Skip to content

Instantly share code, notes, and snippets.

View askdaddy's full-sized avatar

Seven Chan askdaddy

  • Internet
View GitHub Profile
@romanov
romanov / gist:abc494ee7b08f232f539
Last active January 16, 2016 14:40
node-webkit debug on Windows via Powershell
# path to nw.exe
$nodePath = "d:\Projects\node-webkit-v0.9.2-win-ia32\nw.exe"
# release file path
$releaseFile = "d:\Projects\app.nw"
# path to the app project
$appFolder = "d:\Projects\nodeApp1\app"
function ZipFiles( $zipfilename, $sourcedir )
{
Add-Type -Assembly System.IO.Compression.FileSystem
static DWORD GetProcessId(HANDLE hProcess)
{
typedef DWORD (WINAPI *pfnGPI)(HANDLE);
typedef ULONG (WINAPI *pfnNTQIP)(HANDLE, ULONG, PVOID, ULONG, PULONG);
static int first = 1;
static pfnGPI GetProcessId;
static pfnNTQIP ZwQueryInformationProcess;
if (first) {
@TobleMiner
TobleMiner / blaze
Last active December 28, 2016 06:26
dn42 OSPF setup: Lockdown is the peering vm, blaze is the primary router and connects to lockdown via interface dn42. 'some random dn42 enabled vm' is connected to blaze via interface dn42-gw.
protocol ospf dn42
{
table vm;
instance id 1;
export all;
import all;
area 0
{
interface "dn42"
{
@uglide
uglide / install-teamcity.md
Last active November 23, 2017 02:51 — forked from sandcastle/install-teamcity.md
Install TeamCity 9.1.6 on Ubuntu with Nginx
Game = require '../models/game'
game = null
sendGameUpdate = (game)->
process.send
type: 'game'
game: game.toJSON()
sendGameStop = (game)->
@ndelangen
ndelangen / simple-fork-example.js
Created January 2, 2017 14:20
Fork can spawn a new NodeJS process. You give it a javascript file to execute.
const fork = require('child_process').fork;
const program = path.resolve('other.js');
const child = fork(program);
@hideki
hideki / Issue330Test
Created January 16, 2015 00:01
Sample code how to set custom SSLSocketFactory for Couchbase Lite Android/Java
package com.couchbase.lite;
import android.net.SSLCertificateSocketFactory;
import android.os.Build;
import android.test.AndroidTestCase;
import android.util.Log;
import com.couchbase.lite.android.AndroidContext;
import com.couchbase.lite.replicator.Replication;
import com.couchbase.lite.support.CouchbaseLiteHttpClientFactory;
@aschrijver
aschrijver / RNNodeService.java
Last active May 3, 2018 03:59
RNNodeService using ScheduledExecutorService to cancel long-running NodeJS tasks (express webserver) - NOT Working
package world.fullcircle.nodeonandroid;
import android.app.Service;
import android.content.Intent;
import android.content.res.AssetManager;
import android.os.IBinder;
import android.util.Log;
import com.eclipsesource.v8.NodeJS;
import com.eclipsesource.v8.V8;
@hugodias
hugodias / gist:7563544
Created November 20, 2013 13:55
Configure PhpStorm to play nicely with CakePHP
Wednesday, August 24, 2011
Configure PhpStorm to Auto-complete CakePHP Models, Views, and Controllers
After playing around a bit today I finally figured out how to get PhpStorm to auto-complete methods for models and controllers. Here's what you need to do.
Removing Multiple Definitions
First, let's tackle the multiple definitions problem that we see below.
--- git.js 2015-05-11 16:19:29.114852900 -0400
+++ git-patched.js 2015-05-11 16:19:35.788234600 -0400
@@ -12,14 +12,23 @@
, git = npm.config.get("git")
, assert = require("assert")
, log = require("npmlog")
+ , win32 = process.platform === "win32"
+ , cygwin = win32 && (process.env.ORIGINAL_PATH || '').indexOf('/cygdrive/') != -1
function prefixGitArgs () {