This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
env set bootcmd_usb "run findfdt; usb start; if run loadimage_usb; then run usbboot; fi" | |
env set loadfdt_usb "fatload usb ${usbdev}:${usbpart} ${fdt_addr} ${fdt_file}" | |
env set loadimage_usb "fatload usb ${usbdev}:${usbpart} ${loadaddr} ${image}" | |
env set usbargs "setenv bootargs console=${console},${baudrate} root=${usbroot}" | |
env set usbboot "echo Booting from usb ...; run usbargs; if run loadfdt_usb; then bootz ${loadaddr} - ${fdt_addr}; else echo WARN: Cannot load the DT; fi" | |
env set usbdev 0 | |
env set usbpart 1 | |
env set usbroot "/dev/sda2 rootwait rw" | |
run bootcmd_usb |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Copyright 2017 Dan Krause | |
# | |
# Licensed under the Apache License, Version 2.0 (the "License"); | |
# you may not use this file except in compliance with the License. | |
# You may obtain a copy of the License at | |
# | |
# http://www.apache.org/licenses/LICENSE-2.0 | |
# | |
# Unless required by applicable law or agreed to in writing, software | |
# distributed under the License is distributed on an "AS IS" BASIS, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# quick/dirty build a dynamic lib from xpwn - eric monti | |
# WARNING: this was for something really specific -- YMMV... | |
# drop this in your top-level directory where you checked out planetbeing/xpwn and cross your fingers ;) | |
cmake -f CMakeLists.txt | |
make || exit 1 | |
rm -rf ./sharedlib | |
mkdir -p ./sharedlib/lib |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
setlocale(LC_ALL, | |
'id_ID.UTF8', 'id_ID.UTF-8', 'id_ID.8859-1', 'id_ID', | |
'IND.UTF8', 'IND.UTF-8', 'IND.8859-1', 'IND', | |
'Indonesian.UTF8', 'Indonesian.UTF-8', 'Indonesian.8859-1', 'Indonesian', 'Indonesia', | |
'id', 'ID', | |
// Add english as default (if all Indonesian not available) | |
'en_US.UTF8', 'en_US.UTF-8', 'en_US.8859-1', 'en_US', 'American', 'ENG', 'English', | |
); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# from: https://github.com/zimbatm/direnv/blob/3bb35d375331fca89614f0015b2a6cd21688ab79/bin/direnv | |
# usage: abs_dirname $filename | |
# finds the original $filename path and prints it's absolute folder path | |
abs_dirname() { | |
prev_path="$1" | |
# Resolve the symlink(s) recursively | |
while true; do | |
abs_path=`readlink "$prev_path"` | |
if [ -z "$abs_path" ]; then | |
abs_path="$prev_path" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
## Tiny Syslog Server in Python. | |
## | |
## This is a tiny syslog server that is able to receive UDP based syslog | |
## entries on a specified port and save them to a file. | |
## That's it... it does nothing else... | |
## There are a few configuration parameters. | |
LOG_FILE = 'youlogfile.log' |