Skip to content

Instantly share code, notes, and snippets.

View KartikTalwar's full-sized avatar
🚀
Gone phishing

Kartik Talwar KartikTalwar

🚀
Gone phishing
View GitHub Profile
@KartikTalwar
KartikTalwar / NearestGridPoint.py
Created July 15, 2012 22:34
Nearest Grid Coordinate
def generateGrid(x, y, r=1):
matrix = []
for dy in xrange(-r, r+1):
for dx in xrange(-r, r+1):
matrix.append((x+dx, y+dy))
return matrix
print generateGrid(0, 1)
"""
@KartikTalwar
KartikTalwar / cppObsfucated.cpp
Created July 13, 2012 06:39
Obfuscated C++ Code
#include <stdio.h>
#include <time.h>
#define O_O const char*
#define __ if
#define ___ while
#define OO void
O_O O[]={"$%&'(#)*+,-./0#1234567#)89:;<=>#","0?@ABC5D#EFBG#",
"HIJBK#HILBM#HINO-PB#HIFBQ#HIRS#HIATU-VB#","WXY=Z.[#\\]^_`#abc'Rd#efg*h^ij#k*+l-mInd#opBqrC5D#"
,"sJBK#sJBK#HIJtIJ#uBK#HIJtIJ#uBK#","WXY=Z.[#\\]^_`#abc'Rd#efg*h^ij#","\n","I;y.;","21","-,.?29;.-",",1","41*;",
@KartikTalwar
KartikTalwar / tiny.c
Created July 12, 2012 04:37
Tiny-C Compiler
/* file: "tinyc.c" */
/* Copyright (C) 2001 by Marc Feeley, All Rights Reserved. */
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
/*
* This is a compiler for the Tiny-C language. Tiny-C is a
@KartikTalwar
KartikTalwar / kthlargestfrom2arrays.php
Created July 2, 2012 21:19
K-th Largest Number From 2 Sorted Arrays
<?php
// 2 Arrays $a[m] and $b[n]
$i = 0;
$j = 0;
$p = 0;
$k = 2;
for($p = 1; $p < $k; $p++)
# Fixes the issue where the referenced content is not a downloadable file and/or does not exist
"""
# Bug:
- https://learn.uwaterloo.cahttp://cte.uwaterloo.ca/teaching_resources/tips/online_discussions_tips_for_students.html
- https://learn.uwaterloo.cahttp://phet.colorado.edu/new/simulations/sims.php
- https://learn.uwaterloo.cahttp://paws.kettering.edu/~drussell/Demos/wave-x-t/wave-x-t.html
- URL to a file that does not exist
# After Fix:
@KartikTalwar
KartikTalwar / 263Assign3.nb
Created June 1, 2012 23:03
PHYS 263 - Assignment 3 Plot
Plot[
(2 - 9.58 x)/E^(2.21 x) - 2,
{x, -10, 10},
PlotRange -> 10 ,
AxesLabel -> {t, x},
PlotLabel -> Style[
ToExpression[
"x(t) = (2 - 9.58t) {e}^{-2.21t} -2 ",
TeXForm
],
@KartikTalwar
KartikTalwar / TwilioForwarding.xml
Created May 26, 2012 22:50
Twilio Call Forwarding
<?xml version="1.0" encoding="UTF-8"?>
<Response>
<Dial timeout="15" record="true">647-225-4089</Dial>
</Response>
@KartikTalwar
KartikTalwar / NedBot-LMGTFY-Plugin.js
Created April 27, 2012 17:46
Ned Bot LMGTFY Plugin
var plugin = {
name : 'lmgtfy', // must be unique
trigger : ['lmgtfy', 'lmbtfy'], // prefix ned
enabled : 'true', // plugin can be inactive
fuzzy : 'false', // autocorrect mispelled trigger
description : 'Googles things for you', // about the plugin
usage : 'ned lmgtfy yahoo' // usage example
};
module.exports.plugin = plugin;
var plugin = {
name : 'greet',
trigger : ['hi', 'hello', 'wattup', 'whats up'], // built in prefix : ned
enabled : 'true',
general : 'true',
description : 'greets you',
usage : 'ned hi'
};
module.exports.plugin = plugin;
This file has been truncated, but you can view the full file.
[PPP-BRIDGE-NCP]
pppBridge: 1.3.6.1.2.1.10.23.4
pppBridgeTable: 1.3.6.1.2.1.10.23.4.1
pppBridgeEntry: 1.3.6.1.2.1.10.23.4.1.1
pppBridgeOperStatus: 1.3.6.1.2.1.10.23.4.1.1.1
pppBridgeLocalToRemoteTinygramCompression: 1.3.6.1.2.1.10.23.4.1.1.2
pppBridgeRemoteToLocalTinygramCompression: 1.3.6.1.2.1.10.23.4.1.1.3
pppBridgeLocalToRemoteLanId: 1.3.6.1.2.1.10.23.4.1.1.4
pppBridgeRemoteToLocalLanId: 1.3.6.1.2.1.10.23.4.1.1.5