Skip to content

Instantly share code, notes, and snippets.

View tejasmanohar's full-sized avatar
💭
constantly in cramming mode

Tejas Manohar tejasmanohar

💭
constantly in cramming mode
View GitHub Profile
This file has been truncated, but you can view the full file.
zeppelin $ ./dev/change_scala_version.sh 2.11
./dev/../zeppelin-distribution/pom.xml
./dev/../neo4j/pom.xml
./dev/../geode/pom.xml
./dev/../zeppelin-jupyter/pom.xml
./dev/../pig/pom.xml
./dev/../scalding/pom.xml
./dev/../sap/pom.xml
./dev/../zeppelin-display/pom.xml
./dev/../alluxio/pom.xml
@tejasmanohar
tejasmanohar / SLSGetActiveSpace.asm
Created August 27, 2017 05:29
Hopper's disassembly of SkyLight.framework's SLSGetActiveSpace function
_SLSGetActiveSpace:
0006134c push ebp
0006134d mov ebp, esp
0006134f push edi
00061350 push esi
00061351 sub esp, 0x40
00061354 call __pic
__pic:
00061359 pop edi ; CODE XREF=_SLSGetActiveSpace+8
0006135a mov ecx, dword [ebp+arg_0]
@tejasmanohar
tejasmanohar / lines_to_array.py
Created August 7, 2017 04:35
stdin of new-line separated (presumably json) objects to array (for jq)
import fileinput
out = []
for line in fileinput.input():
out.append(line.rstrip())
print('[')
print(',\n'.join(out))
print(']')
2017-06-08T00:46:11Z [CRITICAL] ====== STACKTRACE ======
2017-06-08 00:46:11.579292394 +0000 UTC
goroutine 50 [running]:
github.com/aws/amazon-ecs-agent/agent/sighandlers.StartDebugHandler.func1(0xc420057ce0)
/go/src/github.com/aws/amazon-ecs-agent/agent/sighandlers/debug_handler.go:35 +0xda
created by github.com/aws/amazon-ecs-agent/agent/sighandlers.StartDebugHandler
/go/src/github.com/aws/amazon-ecs-agent/agent/sighandlers/debug_handler.go:40 +0xec
goroutine 1 [select, 21 minutes]:
github.com/aws/amazon-ecs-agent/agent/acs/handler.(*session).startACSSession(0xc42011c000, 0xc5d940, 0xc4212e0d80, 0xc59ac0, 0xc420f9bd80, 0x0, 0x0)
func (m *Monitor) GetStatus(task *ecs.Task) status {
return m.tasks[task.ID]
}
type Monitor struct {
tasks map[string]*task
}
type task struct {
*ecs.Task
status schedulerStatus
}
func New() *Monitor {
@tejasmanohar
tejasmanohar / postgres
Created December 2, 2016 18:17
postgres vs redshift float8
> CREATE TABLE tejas.test (num float8)
CREATE TABLE
Time: 0.020s
> INSERT INTO tejas.test (num) VALUES (2.33125e-315)
INSERT 0 1
Time: 0.004s
> SELECT num FROM tejas.test
+--------------+
| num |
|--------------|

Keybase proof

I hereby claim:

  • I am tejasmanohar on github.
  • I am tejasmanohar (https://keybase.io/tejasmanohar) on keybase.
  • I have a public key whose fingerprint is 771C F359 F2DE C456 78CE 3F6C 86C3 DC35 7731 45AD

To claim this, I am signing this object:

@tejasmanohar
tejasmanohar / .js
Last active January 11, 2016 20:52
simple Node.js CSPRNG
/**
* Dependencies
*/
import { inRange } from 'lodash'
import { randomBytes } from 'crypto'
/**
* CSPRNG
@tejasmanohar
tejasmanohar / .vim
Created January 4, 2016 05:04
:m without moving cursor
command! -nargs=1 -range M let ln = line('.') | <line1>,<line2>move <args> | execute ln