Skip to content

Instantly share code, notes, and snippets.

View looopTools's full-sized avatar

Lars Kakavandi-Nielsen looopTools

View GitHub Profile
@looopTools
looopTools / Readme.md
Last active April 1, 2024 10:23 — forked from carakan/Readme.md
How to install GNU Global with universall ctags support on mac OS

Unfortunately, homebrew does not support --with-universal-ctags option for global (on the state of April 2018) The reason is that universal-ctags is not officially released yet.

Install universal ctags

Run brew install universal-ctags

If you're on macOS, you might have an old ctags installed with command line tools for XCode. To fix this, simply run alias ctags="`brew --prefix`/bin/ctags"

Keybase proof

I hereby claim:

  • I am loooptools on github.
  • I am loooptools (https://keybase.io/loooptools) on keybase.
  • I have a public key ASC3JlgtVo_Ni8KVYMw5xgq_nKBRq8otChEzV2j5HJvBswo

To claim this, I am signing this object:

note: This error originates from a subprocess, and is likely not a problem with pip.
ERROR: Failed building wheel for psutil
Building wheel for cffi (setup.py) ... error
error: subprocess-exited-with-error
× python setup.py bdist_wheel did not run successfully.
│ exit code: 1
╰─> [37 lines of output]
running bdist_wheel
running build
@looopTools
looopTools / Read File to std::vector<uint8_t> in C++
Created February 1, 2019 13:33
How to read a file from disk to std::vector<uint8_t> in C++
inline std::vector<uint8_t> read_vector_from_disk(std::string file_path)
{
std::ifstream instream(file_path, std::ios::in | std::ios::binary);
std::vector<uint8_t> data((std::istreambuf_iterator<char>(instream)), std::istreambuf_iterator<char>());
return data;
}
[tools@tools sw9-source]$ ./waf configure
Setting top to : /home/tools/Documents/project/sw9-source
Setting out to : /home/tools/Documents/project/sw9-source/build
'configure' finished successfully (0.004s)
Screen 0: minimum 8 x 8, current 3360 x 1050, maximum 32767 x 32767
DP1 connected 1680x1050+0+0 (normal left inverted right x axis y axis) 470mm x 300mm
1680x1050 59.95*+
1280x1024 75.02 60.02
1152x864 75.00
1024x768 75.03 60.00
800x600 75.00 60.32
640x480 75.00 59.94
720x400 70.08
DP2 connected primary 1680x1050+1680+0 (normal left inverted right x axis y axis) 470mm x 300mm
// Type your code here, or load an example.
#include <functional>
#include <iostream>
template<typename func>
void bla(func f)
{
f();
}
Larss-MacBook-Pro:book-system larsnielsen$ sudo virtualenv flask
New python executable in /Users/larsnielsen/git/book-system/flask/bin/python
Installing setuptools, pip, wheel...
Complete output from command /Users/larsnielsen/g...tem/flask/bin/python - setuptools pip wheel:
Traceback (most recent call last):
File "<stdin>", line 4, in <module>
File "/Users/larsnielsen/miniconda2/lib/python2.7/tempfile.py", line 32, in <module>
import io as _io
File "/Users/larsnielsen/miniconda2/lib/python2.7/io.py", line 51, in <module>
import _io
def even_palindrom(x):
left = 0
right = len(x) - 1
while(left != right):
print("left: {}".format(left))
print("right: {}".format(right))
if not x[left] == x[right]:
return False
else:
left = left + 1
#include <poll.h>
#include <libudev.h>
#include <stdexcept>
#include <iostream>
#include <string>
udev* hotplug;
udev_monitor* hotplug_monitor;
void init()