This file contains 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 | |
pkill mpv | |
q=$(echo $@ | sed -e 's/ /%20/g') | |
res=$(curl -s "https://www.youtube.com/results?search_query=$q" | sed -e 's/}/\n/g' -e 's/{/\n/g' | grep videoId | grep ']$' |sort -u | cut -d '"' -f 4 | grep -v '%' ) | |
CMD="mpv --shuffle --no-video" | |
for a in $res ; do | |
CMD="$CMD ytdl://$a" | |
done | |
eval $CMD |
This file contains 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 | |
TOKEN="##PUT##YOUR##KEY##HERE" | |
MESSAGE="$1" | |
INSTANCE="c.im" | |
curl --header "Authorization: Bearer ${TOKEN}" \ | |
--form "status=${MESSAGE}" \ | |
"https://${INSTANCE}/api/v1/statuses" |
This file contains 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
Q: whats "fields", whats "boffsets", the offset inside looks wrong. not 0x100003a3c :? | |
Q: will be good to have field offsets starting from struct map address and struct mapping absolute address | |
```sh | |
$ r2 /bin/ls | |
[0x100003a3c]> . ./json.pk | |
[0x100003a3c]> ""poke type Test = struct { byte a; byte b; } | |
[0x100003a3c]> ""poke var root = Test@0x100003a3c#B | |
[0x100003a3c]> poke print json_format(root) | |
{"value": {"fields": [127, 35], "boffsets": [119264, 119272], "mapping": {"mapped": 1, "strict": 1, "IOS": 0, "offset": {34359857632, "type": {"code": "Offset", "info": {"magnitude": {"code": "Integral", "info": {"size": 64, "signed_p": false}}, "unit": 1}}}}}, "type": {"code": "Struct", "info": {"name": "Test", "fields": [{"name": "a", "type": {"code": "Integral", "info": {"size": 8, "signed_p": false}}}, {"name": "b", "type": {"code": "Integral", "info": {"size": 8, "signed_p": false}}}]}}} |
This file contains 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
set cinoptions=p0,t0,:0,=8 | |
set cindent | |
colorscheme desert | |
" peachpuff | |
set noexpandtab | |
set hlsearch | |
set nu | |
set mouse=a | |
sy on |
This file contains 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
function loadMenu() { | |
var menuItems = { | |
"Open Flash": () => openFlash(), | |
"Open File": () => openFile(), | |
"Create File": () => createFile(), | |
"": { | |
value: "" | |
}, | |
"About": { |
This file contains 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
var pen = 'circle'; | |
var discard = null; | |
var kule = [255, 255, 255]; | |
function nextPen () { | |
kule[0] = Math.random(); | |
kule[1] = Math.random(); | |
kule[2] = Math.random(); | |
console.log('CURPEN', pen, kule); | |
switch (pen) { | |
case 'circle': pen = 'pixel'; break; |
This file contains 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
(function(){function r(e,n,t){function o(i,f){if(!n[i]){if(!e[i]){var c="function"==typeof require&&require;if(!f&&c)return c(i,!0);if(u)return u(i,!0);var a=new Error("Cannot find module '"+i+"'");throw a.code="MODULE_NOT_FOUND",a}var p=n[i]={exports:{}};e[i][0].call(p.exports,function(r){var n=e[i][1][r];return o(n||r)},p,p.exports,r,e,n,t)}return n[i].exports}for(var u="function"==typeof require&&require,i=0;i<t.length;i++)o(t[i]);return o}return r})()({1:[function(require,module,exports){ | |
"use strict"; | |
exports.byteLength = u, exports.toByteArray = i, exports.fromByteArray = d; | |
for (var r = [], t = [], e = "undefined" != typeof Uint8Array ? Uint8Array : Array, n = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/", o = 0, a = n.length; o < a; ++o) r[o] = n[o], | |
t[n.charCodeAt(o)] = o; | |
function h(r) { | |
var t = r.length; |
This file contains 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
$ r2 -i examples/test-py-asm.py - | |
[0x00000000]> e asm.arch=MyPyDisasm | |
[0x00000000]> pd 10 | |
0x00000000 0000 opcode 0 | |
0x00000002 0000 opcode 0 | |
0x00000004 0000 opcode 0 | |
0x00000006 0000 opcode 0 | |
0x00000008 0000 opcode 0 | |
0x0000000a 0000 opcode 0 | |
0x0000000c 0000 opcode 0 |
This file contains 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
/* radare - LGPL - Copyright 2007-2021 - pancake */ | |
#if 0 | |
Very simple code parser in C | |
============================ | |
Takes a string representing the code and runs a callback everytime a token is found | |
r_codetok ("string", callback, &userdata); | |
#endif |
This file contains 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
if [ -f ~/.vim/autoload/plug.vim ]; then | |
echo "fzf-vim already installed." | |
else | |
curl -fLo ~/.vim/autoload/plug.vim --create-dirs \ | |
https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim | |
cat >> ~/.vimrc <<EOF | |
call plug#begin('~/.vim/plugged') | |
Plug 'junegunn/fzf', { 'dir': '~/.fzf', 'do': './install --all' } | |
call plug#end() | |
command! -bang -nargs=* GGrep |
NewerOlder