Skip to content

Instantly share code, notes, and snippets.

Keybase proof

I hereby claim:

  • I am cdcs on github.
  • I am claudiodcsilva (https://keybase.io/claudiodcsilva) on keybase.
  • I have a public key whose fingerprint is B84B 86CE C744 F6C9 9DF5 03E2 1794 463F B4F1 AFE5

To claim this, I am signing this object:

@cdcs
cdcs / gitproxy
Last active November 4, 2016 09:31
#!/bin/sh
# Use socat to proxy git through an HTTP CONNECT firewall.
# Useful if you are trying to clone git:// from inside a company.
# Requires that the proxy allows CONNECT to port 9418.
#
# Save this file as gitproxy somewhere in your path (e.g., ~/bin) and then run
# ssh -D 9052 user@external_server
# In a separate terminal run
# chmod +x gitproxy
# git config --global core.gitproxy gitproxy
func main() {
s1 := []byte("this is a test")
s2 := []byte("wokka wokka!!!")
fmt.Println("Hello, playground")
fmt.Println(bhamming(0xFF, 0))
fmt.Println(hamming(s1, s2))
}
load mmc 1:1 0x82000000 zImage
load mmc 1:1 0x88080000 initrd.img; setenv initrd_size ${filesize}
load mmc 1:1 0x88000000 /dtbs/am335x-boneblack.dtb
setenv bootargs console=tty0 console='ttyO0,115200n8' root='/dev/mmcblk0p2 ro' rootfstype='ext4 rootwait fixrtc' 'quiet init=/lib/systemd/systemd'
bootz 0x82000000 0x88080000:${filesize} 0x88000000
#!/bin/bash
NAME=XKYAPP
OBJCOPY=arm-rtems4.11-objcopy
MKIMAGE=mkimage
ADDRESS=0x80000000
ENTRY=0x80000000
### BBB : Configuration
ipaddr=192.168.0.202
serverip=192.168.0.2
netmask=255.255.255.0
### XKY-OS : Configuration
baseaddr=0x81000000
application=/XKYAPP2
### Boot BBB from network
'#else /* !defined(__XMK__) */
typedef struct {
int is_initialized;
void *stackaddr;
int stacksize;
int contentionscope;
int inheritsched;
int schedpolicy;
struct sched_param schedparam;
#endif /* !defined(__XMK__) */
typedef struct {
uint32_t i0;
uint32_t i1;
uint32_t i2;
uint32_t i3;
uint32_t i4;
uint32_t i5;
uint32_t i6_fp;
uint32_t i7;
void rtems_time_travel(long ticks)
{
/* a clock tick in a timespec structure */
struct timespec tick;
/* number of seconds elapsed */
uint32_t seconds;
/* Convert the tick quantum to a timespec */
{ /* partition 1 ********************************************** */
/* PMK_CALLBACK_INVALID */
NULL,
/* PMK_CALLBACK_POS_ENTRY */
(pal_function_pointer) __wrap_boot_card,
/* PMK_CALLBACK_AIRPEX_ENTRY */
P1entry_point,
/* PMK_CALLBACK_AIRPEX_TICK */
NULL,
/* PMK_CALLBACK_GET_PORTS */