Skip to content

Instantly share code, notes, and snippets.

View anatolinicolae's full-sized avatar
😏
look at those commits

Anatoli Nicolae anatolinicolae

😏
look at those commits
View GitHub Profile
@anatolinicolae
anatolinicolae / content-shortcode.php
Created March 8, 2024 08:55
Content inclusion shortcode example
<?php
/**
* Plugin Name: Content Shortcode
**/
add_shortcode('content', function ($atts) {
extract(shortcode_atts([
'slug' => null,
'post_type' => 'post',
@anatolinicolae
anatolinicolae / style.css
Created May 7, 2023 15:24
CSS grid lines
body::after {
content: "";
position: fixed;
width: 100vw;
height: 100vh;
z-index: 9999999;
background-size: calc(100%/6 - 1px);
background-repeat: repeat-x;
background-image: linear-gradient(to right, #9e9e9e29 1px, transparent 1px);
pointer-events: none;
@anatolinicolae
anatolinicolae / keybase.md
Created December 21, 2017 08:13
Keybase proof

Keybase proof

I hereby claim:

  • I am anatolinicolae on github.
  • I am anatoli (https://keybase.io/anatoli) on keybase.
  • I have a public key ASAWZy0YKSyFcXlDdgoX82oGk1MgE8_cHFGHnv9z5mL6mwo

To claim this, I am signing this object:

@anatolinicolae
anatolinicolae / keybase.md
Created October 5, 2017 14:07
What a f*ckin proof.

Keybase proof

I hereby claim:

  • I am anatolinicolae on github.
  • I am anatoli (https://keybase.io/anatoli) on keybase.
  • I have a public key whose fingerprint is 526F 3A19 6A59 42C4 2B10 F6A1 48F2 40D8 F1EB 9C7F

To claim this, I am signing this object:

@anatolinicolae
anatolinicolae / rammesync.js
Last active October 4, 2017 15:42
Sync source to dest with excludes
#!/usr/bin/env node
const exec = require('child_process').exec
let source = process.argv[2]
let destination = process.argv[3]
let command = `rsync -avz `
for (let i = 4; i < process.argv.length; i++) {
command += `--exclude "${process.argv[i]}" `
}
@anatolinicolae
anatolinicolae / 10_dns_list.txt
Last active March 2, 2017 20:20
DNS Latency Check
209.244.0.3
209.244.0.4
64.6.64.6
64.6.65.6
8.8.8.8
8.8.4.4
84.200.69.80
84.200.70.40
8.26.56.26
8.20.247.20
@anatolinicolae
anatolinicolae / infinit-backup.php
Last active February 23, 2017 20:36
Infinit.io links backup
<?php
// Your current session cookie
$cookie = '';
// Files storage path
$storage_dir = './infinit-backup';
// Don't change anything below this. Just works™
$offset = 0;
@anatolinicolae
anatolinicolae / tomcat-install.sh
Last active March 8, 2016 23:58
Docked Tomcat installer
#!/bin/sh
set -e
user="$(id -un 2>/dev/null || true)"
if [ "$user" != 'root' ]; then
echo "Please run as root"
exit
fi
# Check if cmd exists
@anatolinicolae
anatolinicolae / jsprun.py
Last active March 8, 2016 21:29
Simple script that compiles Netbeans projects and runs Tomcat in Docker.
#!/usr/bin/env python
import click, tempfile, shutil, subprocess, os
"""Simple script that compiles Netbeans projects and runs Tomcat in Docker."""
class jsprun:
def __init__(self, d, n):
self.d = d
self.n = n
@anatolinicolae
anatolinicolae / dabblet.css
Created June 19, 2012 08:31
Stylish Gradient Buttons
/**
* Stylish Gradient Buttons
*/
/**
* Designed and coded by Anatoli Nicolae
* http://dribbble.com/anatolinicolae
*/
body {
background: #f5f5f5;