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/sh | |
| export PM=$(grep -c processor /proc/cpuinfo) | |
| # TODO compile LLVM compiler_rt for target | |
| ./configure \ | |
| --prefix=/ \ | |
| --target=armv7a-unknown-linux-eabi \ | |
| CC=clang \ |
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
| { | |
| "editor.detectIndentation": false, | |
| "editor.folding": false, | |
| "editor.lineNumbers": "off", | |
| "editor.renderWhitespace": "boundary", | |
| "files.eol": "\n", | |
| "git.autofetch": true, | |
| "git.confirmSync": false, | |
| "telemetry.enableCrashReporter": false, | |
| "telemetry.enableTelemetry": false, |
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 json | |
| import os | |
| import requests | |
| import sys | |
| import urllib.parse | |
| def google_search(**params): | |
| params = dict(params, source='python', output='json') | |
| response = requests.get('https://serpapi.com/search', params) | |
| if response.status_code != 200: |
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/sh | |
| exec docker run -i -t --rm "$1" /bin/bash |
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
| URxvt*.buffered: true | |
| URxvt*.transparent: true | |
| URxvt*.shading: 30 | |
| URxvt*.background: black | |
| URxvt*.foreground: white | |
| URxvt*.font: xft:DejaVu Sans Mono:size=10 | |
| URxvt*.scrollstyle: plain | |
| URxvt*.scrollBar_right: true | |
| *color0: #2E3436 |
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/sh | |
| exec qemu-system-i386 -enable-kvm -cpu host -m 1024 -vga std -soundhw ac97 -net nic,model=rtl8139 \ | |
| -net user -drive file=winxp.img,format=raw -drive file=/usr/share/virtio/virtio-win.iso,media=cdrom |
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
| $ sudo pacman -Rc systemd | |
| checking dependencies... | |
| :: alsa-plugins optionally requires libpulse: PulseAudio plugin | |
| :: alsa-plugins optionally requires ffmpeg: libavcodec resampling plugin, a52 plugin | |
| :: alsa-tools optionally requires gtk2: other GUI tools | |
| :: alsa-tools optionally requires gtk3: hdajackretask | |
| :: avahi optionally requires gtk3: avahi-discover-standalone, bshell, bssh, bvnc | |
| :: avahi optionally requires gtk2: gtk2 bindings | |
| :: avahi optionally requires qt4: qt4 bindings |
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 sys | |
| from decimal import Decimal, ROUND_UP | |
| def ebay_postage_price(p): | |
| d = p * (1 / (1 - Decimal('0.134'))) + Decimal('0.20') | |
| return d.quantize(Decimal('0.1'), rounding=ROUND_UP) | |
| for x in sys.argv[1:]: | |
| print(format(ebay_postage_price(Decimal(x)), '.2f')) |
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 <stdio.h> | |
| #include "tommath.h" | |
| int main() | |
| { | |
| mp_int a, b, c; | |
| mp_init(&a); | |
| mp_init(&b); | |
| mp_init(&c); |
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 <stdio.h> | |
| #include "mpdecimal.h" | |
| int main() | |
| { | |
| mpd_context_t ctx; | |
| mpd_t *a, *b, *c; | |
| mpd_maxcontext(&ctx); | |