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
import logging | |
import sys | |
from bs4 import Tag, NavigableString, BeautifulSoup | |
logger = logging.getLogger(__name__) | |
class Context: | |
def __init__(self): |
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
# Print 256 words in hexadecimal format | |
x/256wx (int*)&chip.sectors[1] | |
# Display code at address | |
list *address |
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 gdb.printing import PrettyPrinter, register_pretty_printer | |
import gdb | |
import uuid | |
# https://sourceware.org/gdb/current/onlinedocs/gdb/Python-API.html#Python-API | |
# https://interrupt.memfault.com/blog/automate-debugging-with-gdb-python-api | |
class MultipleDefaultObserverPrinter(object): | |
""" Print the observed default. """ |
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
#include <array> | |
#include <iostream> | |
template <typename T> | |
auto oldFoldSumR(T t) { | |
return t; | |
} | |
template <typename T1, typename ...Ts> |
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
#include <algorithm> | |
#include <functional> | |
#include <iostream> | |
#include <iterator> | |
#include <numeric> | |
#include <vector> | |
int main() { | |
const std::array a1 = {1, 2, 3, 4, 5}; | |
const std::array a2 = {1, 2, 4, 4, 5}; |
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
https://apps.crashlytics.com/register/MLGdBGyLFCvRUADsLVxthpt8/rsvp?utm_medium=email&utm_source=invite_tester |
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
void (*cause_hardfault)(void); | |
cause_hardfault(); |
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
package com.emil.android.util; | |
import android.content.Context; | |
import android.net.ConnectivityManager; | |
import android.net.NetworkInfo; | |
import android.telephony.TelephonyManager; | |
/** | |
* Check device's network connectivity and speed | |
* @author emil http://stackoverflow.com/users/220710/emil |