Skip to content

Instantly share code, notes, and snippets.

37a38
> from six.moves.urllib.error import HTTPError
107c108
< data = json.load(open_url(request_path, data=request_params))
---
> data = json.load(open_url(request_path, data=request_params, validate_certs=False))
118c119
< request = open_url(request_path, data=data, headers=headers)
---
> request = open_url(request_path, data=data, headers=headers, validate_certs=False)

Keybase proof

I hereby claim:

  • I am andor44 on github.
  • I am andor (https://keybase.io/andor) on keybase.
  • I have a public key ASDBVFfNs2wKFsmnFWN8FSNQKhO7vgdr0HyjM1hwp499dQo

To claim this, I am signing this object:

fn read_memory(pid: u32, address: usize, len: usize) -> Vec<usize> {
let mut buffer = Vec::with_capacity(len);
let mut bytes_read = 0usize;
let h_process = unsafe { kernel32::OpenProcess(0x1F0FFF, 0, pid) };
unsafe {
kernel32::ReadProcessMemory(
h_process,
address as winapi::minwindef::LPCVOID,
buffer.as_mut_ptr() as winapi::minwindef::LPVOID,
4u64 * BUF_LEN,
unsafe {
let namelen = GetWindowTextLengthA(wh);
let mut namebuf : ~[u8] = std::vec::with_capacity((namelen+2) as uint);
GetWindowTextA(wh, namebuf.as_mut_ptr() as *mut i8, namelen+1);
namebuf.set_len(namelen as uint);
println!("Window: {:s}", match std::str::is_utf8(namebuf) {
true => std::str::from_utf8(namebuf),
false => "Non-UTF8 win name"}
);
}
// on windows 7 64bit, the following program produces this output:
//D:\dev\rust>test.exe
//test4
//test1
//^C
//D:\dev\rust>
extern mod std;
@andor44
andor44 / Program.cs
Last active December 14, 2015 19:28
using System.Linq;class p{static void Main(){System.IO.File.ReadAllLines("a.txt").Select(x=>x.Substring(0,x.TakeWhile(y=>y==' ').Count())+x.TrimStart(' ').Split(' ').Where(y=>y!="").Aggregate("",(y,w)=>(y+=w+" ")).TrimEnd(' ')).ToList().ForEach(System.Console.WriteLine);}}
@andor44
andor44 / Main.cs
Created March 10, 2013 21:15
számösszeg
using System;
namespace teststuff
{
class Program
{
static ulong szamjegy_osszeg(ulong x)
{
ulong ossz = 0;
ulong lim = (ulong)Math.Ceiling(Math.Log10(x));
match sdl::event::poll_event() {
sdl::event::QuitEvent => break main,
sdl::event::NoEvent => break event,
sdl::event::KeyEvent { Key: key, _ } => {
match key {
AKey => {}
_ => {}
}
}
_ => {}
sudo mkfs.ext4 /dev/mmcblk0p1
mke2fs 1.42.13 (17-May-2015)
Warning: could not erase sector 2: Attempt to write block to filesystem resulted in short write
Creating filesystem with 1925888 4k blocks and 482384 inodes
Filesystem UUID: 9bb89b28-cfa6-4c82-b130-c17dc280c92f
Superblock backups stored on blocks:
32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632
Allocating group tables: done
Warning: could not read block 0: Attempt to read block from filesystem resulted in short read
[ 494.907448] mmc0: new high speed SDHC card at address 59b4
[ 494.907861] mmcblk0: mmc0:59b4 00000 7.35 GiB
[ 494.908959] mmcblk0: p1
[ 495.262047] mmcblk0: error -110 transferring data, sector 12624, nr 72, cmd response 0x900, card status 0xb00
[ 496.633172] mmc0: card never left busy state
[ 496.633184] mmc0: tried to reset card
[ 496.633189] mmcblk0: retrying using single block read
[ 496.637929] mmcblk0: error -110 sending status command, retrying
[ 496.640230] mmcblk0: error -110 sending status command, retrying
[ 496.642569] mmcblk0: error -110 sending status command, aborting