sudo apt-get install autoconf automake libtool curl make g++ unzip -y
git clone https://github.com/google/protobuf.git
cd protobuf
git submodule update --init --recursive
./autogen.sh
make
make check
sudo make install
sudo ldconfigUsing Memtest86 Free Edition
At the time of writing, this installed V7.4 for UEFI and V4 for BIOS boot.
Caution: you have to use the correct device name for your flashdrive
wget https://www.memtest86.com/downloads/memtest86-usb.tar.gz
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
| /** | |
| * This gist is for Javascript beginners. | |
| * @author: Anthony Du Pont <[email protected]> | |
| * @site: https://www.twitter.com/JsGists | |
| * | |
| * Linear Interpolation is a method to add some natural behaviors to your animations. The more natural | |
| * your animations look like, the better will be the look-and-feel. But what's Linear Interpolation ? | |
| * | |
| * Linear Interpolation, also called `lerp`, is a way of easing your animation. Imagine you want to | |
| * move a box from a position A to a position B. Without the Linear Interpolation, you box will |
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
| // Djb2 hash function | |
| unsigned long hash(char *str) { | |
| unsigned long hash = 5381; | |
| int c; | |
| while ((c = *str++)) | |
| hash = ((hash << 5) + hash) + c; /* hash * 33 + c */ | |
| return hash % NUM_BUCKETS; | |
| } |
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
| # This is an example of hash length extension attacks (and why you don't roll your own crypto!!!) | |
| # In this case, an attacker, Malice, intercepts a message ("to=12345&amt=103.53¬e=Thanks!") | |
| # that has been "authenticated" using a poorly constructed MAC (message authentication code). | |
| # This MAC has been created using the following method: md5(secret | message). | |
| # Ideally, since the attacker, Malice, doesn't have the secret, he should be unable to craft a new | |
| # message that is also authenticated. However, because of how the mac was created, we can use | |
| # Hash Length Extensions. We'll be using the pymd5 library as found on upenn's website via google cache: | |
| # https://webcache.googleusercontent.com/search?q=cache:yyvXXyVKuYYJ:https://www.cis.upenn.edu/~cis331/project1/pymd5.py+&cd=3&hl=en&ct=clnk&gl=us | |
| import urllib |
: By the power of this magic string: ex: set ft=markdown ;:<<'```shell' #, this file is now both a markdown document and an executable shell script. chmod +x it and try running it!
The above line does just what it says. More specifically, when placed within in the first 5 lines and preceded only by blank lines or #-prefixed markdown headers:
- The first part of the magic string makes github and various editors (e.g. atom with the vim-modeline packge) treat the file as having markdown syntax (even if the file doesn't have an extension)
- The second part (if run in a shell), makes the shell skip execution until it encounters the next
```shellblock.
(The line also has to start with a : so that it's valid shell code.)
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 | |
| # small tool to retreive vk.com (vkontakte) users hidden metadata (state, access, dates, counts, etc) anonymously (without login) | |
| # sudo apt install curl | |
| parse(){ | |
| local IFS=\> | |
| read -d \< CELL VALUE | |
| } |
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://forum.nim-lang.org/t/2856 | |
| import macros | |
| macro chaining(code: untyped): untyped = | |
| const chainIdent = "chain" | |
| const combineIdent = "combine" | |
| proc inspect(depth: int, n: NimNode): NimNode = | |
| case(n.kind) | |
| of nnkIdent, nnkStrLit: |