Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

View sebnitu's full-sized avatar

Sebastian Nitu sebnitu

View GitHub Profile
@sebnitu
sebnitu / mwo-button-clicker.js
Last active March 21, 2023 20:01
Run script on MWO loot bag events page to auto click buttons.
/**
* How it works:
* 1) Go to the lootbag page in MWO
* 2) Open the dev tools and paste the following code into the console
* 3) Run the script and enjoy the loot!
*/
console.log('👀 Searching for loot buttons...');
let intID = setInterval(() => {
const btn = document.querySelector('.reachButton');
if (btn) {
@sebnitu
sebnitu / .bash_profile
Last active November 12, 2018 00:59
My personal bash profile
# ------------------------------------------------------------------------------
# Bash Profile
# ---
# This file is loaded whenever a console or terminal window is opened. It can
# also be reloaded by using the `profile` alias.
#
# GitHub Gist:
# https://gist.github.com/sebnitu/a4dceab1df590cd51d3e8d450590ee01
#
# Bookmarks:
@sebnitu
sebnitu / mtime.js
Last active November 5, 2018 01:21
Gulp 4 workaround for updating atime and mtime on dest files.
// npm install --save-dev through2
import through2 from 'through2'
// Add this pipe before your gulp.dest() call
// ...
.pipe(through2.obj(function(file, enc, cb) {
var date = new Date()
file.stat.atime = date
file.stat.mtime = date
cb(null, file)
@sebnitu
sebnitu / asset.html
Last active November 3, 2017 18:51
Context Specific Assets with Jekyll
{%- capture type -%}
{%- if page.layout == "post" -%}
posts
{%- elsif page.collection -%}
{{ page.collection }}
{%- else -%}
pages
{%- endif -%}
{%- endcapture -%}
@sebnitu
sebnitu / index.html
Created September 8, 2017 23:22
Example starter file
<!DOCTYPE html>
<html lang="en">
<head>
<!-- Required Meta Data -->
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<title>BaseWeb</title>
@sebnitu
sebnitu / gulpfile.js
Last active July 20, 2019 00:22
An example file for creating multi-site build scripts using Gulp
// Require Packages
var gulp = require('gulp');
// Paths variable
var paths = {
themes: 'wp-content/themes/',
shared: 'shared/',
src: 'src/',
dest: 'dist/'
};
@sebnitu
sebnitu / _pagination.scss
Last active September 8, 2017 23:26
A modular UI component example
// ----
// libsass (v3.2.5)
// ----
// Set file variable
$filename: 'scss/blocks/_pagination.scss';
////////////////////////////////////////////////////////////////////////////////
// @Pagination Map
////////////////////////////////////////////////////////////////////////////////