Na zaciatku sa premapuju skakajuce instrukcie na realne adresy targetujucej instrukcie, odstrania sa tym padom label instrukcie.
CALL MAIN
EXIT
LABEL MAIN
ADD 3 2
xorriso -as mkisofs -R -f \ | |
-full-iso9660-filenames \ | |
-e EFI/BOOT/efiboot.img \ | |
-no-emul-boot \ | |
-output "./efi.iso" "/tmp/ram/efi" |
INSTR_T create_{{ iname }}_{{ ptype }}_instr(const int a, const int b) { | |
instruction_t *i = calloc(1, sizeof(instruction_t)); | |
i->type = I_{{ iname }}; | |
ZVAL_INIT_INT(i->first, a); | |
ZVAL_INIT_INT(i->second, b); | |
return i; | |
} |
#!/bin/bash | |
for f in $(git status --porcelain); do | |
if [ -f "$f" ]; then | |
hash=$(git log -n1 --pretty=%H "$f") | |
if [ ! -z "$hash" ]; then | |
git add "$f" && git commit --fixup "$hash" | |
fi; | |
fi | |
done |
const _ = require('lodash'); | |
module.exports = function(fileInfo, api) { | |
const j = api.jscodeshift; | |
const root = j(fileInfo.source); | |
root.find(j.CallExpression, { | |
callee: { | |
type: 'MemberExpression', |
#include <GLFW/glfw3.h> | |
#include <yoga/Yoga.h> | |
#include <stdlib.h> | |
int main(void) | |
{ | |
GLFWwindow* window; | |
/* Initialize the library */ | |
if (!glfwInit()) |
#!/bin/bash | |
timestamp=`date +%Y%m%d-%H%I%S` | |
name="artifacts-$timestamp.zip" | |
channels="#dev" | |
url="https://slack.com/api/files.upload" | |
zip -r "$name" . || exit 0 | |
curl -F file=@"$name" \ |
I hereby claim:
To claim this, I am signing this object:
[Unit] | |
Description=Update nginx config on docker container restart | |
After=docker.service | |
[Service] | |
Type=simple | |
ExecStart=/root/dokku-update-nginx-on-container-restart.sh | |
Restart=on-failure | |
RestartSec=5s |
I write scripts everyday, and it's hard to keep them sorted. I wrote this simple tool that allows me to sync them to gist whenever I want. This is nice because I can write script in random places and make sure I never loose it.
For now this only works one-way - me pushing to gist.
sync-gist -f my-script