git fetch --all
git checkout origin/master -- <your_file_path>
git add <your_file_path>
git commit
#git commit -m "<your_file_name> updated"
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
# Generic Makefile for my projects | |
# https://github.com/r4v10l1/ | |
CC=gcc | |
CFLAGS=-Wall | |
all: output.out | |
output.out: src/* | |
$(CC) $(CFLAGS) -o $@ src/main.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
// Copyright (c) 2014, Jan Winkler <[email protected]> | |
// All rights reserved. | |
// | |
// Redistribution and use in source and binary forms, with or without | |
// modification, are permitted provided that the following conditions are met: | |
// | |
// * Redistributions of source code must retain the above copyright | |
// notice, this list of conditions and the following disclaimer. | |
// * Redistributions in binary form must reproduce the above copyright | |
// notice, this list of conditions and the following disclaimer in the |
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
document.getElementsByTagName("a").forEach(a => { console.log(a.href) }); |
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 | |
repos=( | |
"vat" | |
"v-stuff" | |
"browser-homepage" | |
"discord-bot" | |
"vim-dotfiles" | |
"dotfiles" | |
"langtons-ant-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
// ==UserScript== | |
// @name Delay function | |
// @namespace Violentmonkey Scripts | |
// @include *://example.com/* | |
// @run-at document-start | |
// @author Null (r4v10l1) | |
// ==/UserScript== | |
// --------------------- Settings --------------------- | |
var MY_DELAY = 500; // ms, delayChecker will wait this |
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
// ==UserScript== | |
// @name Remove suggestions YouTube | |
// @namespace Violentmonkey Scripts | |
// @include *://*.youtube.com/* | |
// @grant GM_addStyle | |
// @run-at document-idle | |
// @author Null (r4v10l1) | |
// ==/UserScript== | |
GM_addStyle (` |
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
# Will backup the 'D:/Stuff' folder to 'E:/Stuff' (Will create the folder if does not exist) | |
rsync -av /cygdrive/d/Stuff /cygdrive/e | |
# Will ignore exising files | |
rsync -av --ignore-existing /cygdrive/d/Stuff /cygdrive/e | |
# Will delete files that no longer exist in 'D:/Stuff' | |
rsync -av --delete /cygdrive/d/Stuff /cygdrive/e |
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
# Build image | |
docker build -d image_name . | |
# Run image in daemon and remove after exit | |
docker run --name container_name --rm -it -d image_name | |
# Clear images without tag | |
docker rmi $(docker images -f "dangling=true" -q) | |
# Clone an image's tag |
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> | |
#define ARRAY_SIZE 10 | |
int test(int* array, int ys, int xs) { | |
int desiredx = 5; | |
int desiredy = 3; | |
array[desiredy * xs + desiredx] = 1; | |
array[desiredy * ys + desiredx] = 2; |