Skip to content

Instantly share code, notes, and snippets.

---------------------------objdump---------------------------------------------
00000000 <.text>:
0: b8 ec d2 79 3f mov $0x3f79d2ec,%eax
5: 8d ac 24 28 02 00 00 lea 0x228(%esp),%ebp
c: 68 4e 8c 04 08 push $0x8048c4e
11: c3 ret
-----------------------------GDB-----------------------------------------------
[HttpGet]
public ActionResult ReadWidget(long id)
{
WidgetBusiness widgetBusiness = new WidgetBusiness();
Widget widget = widgetBusiness.Get(id);
return File(widget.Data, "image/jpg");
}
[HttpGet]
public HttpResponseMessage ReadWidget(long id)
{
WidgetBusiness widgetBusiness = new WidgetBusiness();
Widget widget = widgetBusiness.Get(id);
HttpResponseMessage response = new HttpResponseMessage();
response.Content = new ByteArrayContent(widget.Data);
response.Content.Headers.ContentDisposition = new System.Net.Http.Headers.ContentDispositionHeaderValue("attachment");
response.Content.Headers.ContentDisposition.FileName = widget.Id.ToString();
@arn-e
arn-e / gist:80a8f49c80d011d71790
Created March 17, 2015 01:40
chromium_processes
➜ ~ ps aux | grep chromium
arne 24533 6.4 0.7 3087240 123124 ? Sl 21:34 0:06 /usr/lib/chromium-browser/chromium-browser --disable-new-tab-first-run --enable-user-scripts
arne 24540 0.6 0.0 466772 11332 ? S 21:34 0:00 /usr/lib/chromium-browser/chromium-browser --disable-new-tab-first-run --enable-user-scripts
arne 24541 0.0 0.0 6504 408 ? S 21:34 0:00 /usr/lib/chromium-browser/chrome-sandbox /usr/lib/chromium-browser/chromium-browser --type=zygote
arne 24542 0.0 0.1 486840 32688 ? S 21:34 0:00 chromium-browser --type=zygote
arne 24548 0.0 0.0 560572 8392 ? S 21:34 0:00 chromium-browser --type=zygote
arne 24580 4.7 0.6 1357008 110692 ? Sl 21:34 0:04 /usr/lib/chromium-browser/chro
arne 24590 0.5 0.2 1295952 37348 ? Sl 21:34 0:00 /usr/lib/chromium-browser/chro
arne 24597 1.2 0.2 137
#!/bin/bash
echo "HADOOKEN, $1!"
ps aux | grep $1 | awk '{print $2}' | xargs kill -
#!/bin/bash
echo "HADOOKEN, $1!"
ps aux | grep $1 | awk '{print $2}' | xargs kill -9
@arn-e
arn-e / gist:d016ed378a44298a62e6
Created March 17, 2015 01:59
hastalachromium
➜ dotfiles git:(master) ✗ ./process_kill.sh chromium
HADOOKEN, chromium!
[1] 25738 killed ./process_kill.sh chromium
@arn-e
arn-e / gist:1584078
Created January 9, 2012 17:45
Document Review and the High Cost of Civil Litigation
Document Review and the High Cost of Civil Litigation
-----------------------------------------------------
Despite soaring discovery costs, the legal industry has by many accounts been slow to adapt to
the 21st century. Legal discovery refers to the initial phase of litigation during which the
disputing parties exchange information relevant to the case. Today, the majority of material
gathered consists of electronically stored information (ESI). ESI is an umbrella term used to
describe all electronic data, including e-mail (Outlook, Entourage, EML / RFC-2822) and e-docs
(PDF, plain text).
Traditionally, ESI has been reviewed in what is called a *linear* fashion. This means teams of
@arn-e
arn-e / newton_root.rb
Created September 8, 2012 06:19
Newton Root Work
def newton_root(n)
puts "\nvalue : #{n}"
guess = Math.sqrt(n)-4
puts "start : #{guess}"
for i in 1..9
guess = (n/guess + guess)/2
puts "guess #{i} : #{guess}"
end
puts "result : #{guess}"
return guess
@arn-e
arn-e / calc_fiboncci.rb
Created September 11, 2012 07:46
Newton Fibonacci
require 'benchmark'
def is_fibonacci?(i)
a,b=0,1
until b >= i
a,b=b,a+b
return true if b == i
end
end