Skip to content

Instantly share code, notes, and snippets.

#include <stdio.h>
#include <stdlib.h>
int main()
{
int x;
int *p;
p = (int*)malloc(sizeof(x));
p = &x;
adfadfadfadf
@tedwardd
tedwardd / error.txt
Created April 6, 2017 00:47
end of build.sh output with error
+ pip install -r linux_macos.txt
Processing /home/elw/git-work/lbry-app/lbryum
Processing /home/elw/git-work/lbry-app/lbry
Complete output from command python setup.py egg_info:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/tmp/pip-yjmm1575-build/setup.py", line 50, in <module>
long_description = f.read().decode('utf-8')
AttributeError: 'str' object has no attribute 'decode'
$ pip install --verbose Twisted
Collecting Twisted
1 location(s) to search for versions of Twisted:
* https://pypi.python.org/simple/twisted/
Getting page https://pypi.python.org/simple/twisted/
Looking up "https://pypi.python.org/simple/twisted/" in the cache
Current age based on date: 835
Freshness lifetime from max-age: 600
Freshness lifetime from request max-age: 600
The cached response is "stale" with no etag, purging
@tedwardd
tedwardd / errors
Created October 7, 2017 13:03
weechat build errors
[ 93%] Building C object src/gui/curses/CMakeFiles/weechat_gui_curses.dir/gui-curses-bar-window.o
In file included from /usr/pkg/include/ncursesw/ncurses.h:1969,
from /meta/e/elw/build/weechat-1.9.1/src/gui/curses/gui-curses.h:26,
from /meta/e/elw/build/weechat-1.9.1/src/gui/curses/gui-curses-bar-window.c:42:
/usr/pkg/include/ncurses/unctrl.h:60: error: conflicting types for ‘unctrl’
/usr/pkg/include/ncurses/unctrl.h:57: note: previous declaration of ‘unctrl’ was here
make[2]: *** [src/gui/curses/CMakeFiles/weechat_gui_curses.dir/gui-curses-bar-window.o] Error 1
make[1]: *** [src/gui/curses/CMakeFiles/weechat_gui_curses.dir/all] Error 2
make: *** [all] Error 2

Keybase proof

I hereby claim:

  • I am tedwardd on github.
  • I am tedward (https://keybase.io/tedward) on keybase.
  • I have a public key ASCMQX58zo92lLp0QK4PwSSA18SgtxRr_wuzsWe9EVxH3Ao

To claim this, I am signing this object:

@tedwardd
tedwardd / output.txt
Created April 22, 2020 18:07
Terraform plan debug output
2020/04/22 13:29:17 [WARN] Log levels other than TRACE are currently unreliable, and are supported only for backward compatibility.
Use TF_LOG=TRACE to see Terraform's internal logs.
----
2020/04/22 13:29:17 [INFO] Terraform version: 0.12.24
2020/04/22 13:29:17 [INFO] Go runtime version: go1.12.13
2020/04/22 13:29:17 [INFO] CLI args: []string{"/usr/local/Cellar/tfenv/1.0.2/versions/0.12.24/terraform", "plan"}
2020/04/22 13:29:17 [DEBUG] Attempting to open CLI config file: /Users/xxxxx/.terraformrc
2020/04/22 13:29:17 [DEBUG] File doesn't exist, but doesn't need to. Ignoring.
2020/04/22 13:29:17 [DEBUG] checking for credentials in "/Users/xxxxx/.terraform.d/plugins"
2020/04/22 13:29:17 [INFO] CLI command args: []string{"plan"}
@tedwardd
tedwardd / direwolf.conf
Created April 29, 2020 19:19
direwolf config
#############################################################
# #
# Configuration file for Dire Wolf #
# #
# Linux version #
# #
#############################################################
#
# Consult the User Guide for more details on configuration options.
#
$ rigctld -m 4 -r localhost:12345 -vvvvvv
Recommend using --vfo switch for rigctld if client supports it
rigctl and netrigctl will automatically detect vfo mode
rigctld, Hamlib 4.0~git
Report bugs to <[email protected]>
rig_init called
initrigs4_dummy: _init called
rig_register called
rig_register: rig_register (1)
@tedwardd
tedwardd / google_resourcemanager_path_crawler.py
Created December 11, 2020 18:27
Inefficient GCP Path Crawler
"""
This crawls through a folder hierarchy searching for a specific folder in GCP using Google's v2 folders API:
https://cloud.google.com/resource-manager/reference/rest/v2/folders
The better way to do this for real is to use the v2 folder search API:
https://cloud.google.com/resource-manager/reference/rest/v2/folders/search
This is here only as a reminder that you should always read API docs COMPLETELY before writing a solution to a problem
"""
def __get_folder_id(self, folder, parent):
folder_data = (
self.crm_v2.folders().list(parent=parent).execute().get("folders", "")