Skip to content

Instantly share code, notes, and snippets.

View obonyojimmy's full-sized avatar
💻
probably coding

jimmycliff obonyo obonyojimmy

💻
probably coding
View GitHub Profile
@obonyojimmy
obonyojimmy / better-nodejs-require-paths.md
Created July 9, 2016 20:55 — forked from branneman/better-nodejs-require-paths.md
Better local require() paths for Node.js

Better local require() paths for Node.js

Problem

When the directory structure of your Node.js application (not library!) has some depth, you end up with a lot of annoying relative paths in your require calls like:

var Article = require('../../../models/article');

Those suck for maintenance and they're ugly.

Possible solutions

@obonyojimmy
obonyojimmy / in.ts
Created August 29, 2016 18:24 — forked from indus/in.ts
Typescript Pattern for Vue Components
module MyModule {
export class MyClass extends Vue {
// define instance methods
myMethod() {
// the TS-Type of "this" is defined as Instance of MyClass
console.log("myMethod");
}
myOtherMethod() {
console.log("myOtherMethod");
@obonyojimmy
obonyojimmy / AuthenticateController.php
Created October 22, 2016 05:45 — forked from iolson/AuthenticateController.php
SentinelAuthAdapter for using Tymon\JWTAuth with Cartalyst\Sentinel
<?php namespace App\Http\Controllers\Api\V1;
use App\Http\Controllers\Controller;
use App\Http\Requests;
use Illuminate\Http\Request;
use Tymon\JWTAuth\Facades\JWTAuth;
use Tymon\JWTAuth\Exceptions\JWTException;
class AuthenticateController extends Controller
{
@obonyojimmy
obonyojimmy / jquery-datatables-webpack
Created October 27, 2016 03:35 — forked from marcstober/jquery-datatables-webpack
DataTables.net with webpack
Here's how to make jQuery DataTables work with npm and webpack. This is the simplest way I found to do it.
See the previous revision of this gist for a way to do it with forcing AMD to be disabled if you need that.
Install DT core: npm install datatables.net
Install a DT style: npm install datatables.net-dt
Then to initialize DT in your app, do this in your main entry point:
// you can use import or require
import dt from 'datatables.net';
package main
import (
"fmt"
"io"
"os"
)
var path = "/Users/novalagung/Documents/temp/test.txt"
package main
import (
"fmt"
"syscall"
"time"
"unsafe"
)
func main() {
@obonyojimmy
obonyojimmy / win32.go
Created January 2, 2017 00:09 — forked from nathan-osman/win32.go
Simple Windows GUI application written in Go
package main
import (
"log"
"syscall"
"unsafe"
)
var (
kernel32 = syscall.NewLazyDLL("kernel32.dll")
@obonyojimmy
obonyojimmy / sclg4.c
Created January 3, 2017 04:48 — forked from aktau/sclg4.c
A simple WinAPI GetAsyncKeyState()-based keylogger, written a very long time ago. I dug it out of the archives because of a Hacker News post (https://news.ycombinator.com/item?id=7607082). For educational purposes only, of course.
/**
* Copyright (c) 2006, Nicolas Hillegeer
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
@obonyojimmy
obonyojimmy / winsvc.go
Created January 7, 2017 03:28 — forked from chai2010/winsvc.go
Windows系统服务例子
// Copyright 2015 <chaishushan{AT}gmail.com>. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
// +build ingore
package main
import (
"flag"
@obonyojimmy
obonyojimmy / AndroidTrinity.md
Created January 11, 2017 00:40 — forked from pdxjohnny/AndroidTrinity.md
Trinity on Android for Intel

Trinity fuzzer on Android (on Intel)

Step 1 - Clone trinity

Grab the source for trinity. We need to make some minor modifications.

At the time of writing this the latest commit on master was 3a0e33d1db3214503316840ecfb90075d60ab3be adapt instructions as necessary. The basic idea of static linking and disabling of feature's you don't need is still the same.