Skip to content

Instantly share code, notes, and snippets.

View applicato's full-sized avatar

applicato

  • Ireland
View GitHub Profile
@applicato
applicato / GDPR.md
Created September 26, 2018 13:06 — forked from zero-master/GDPR.md
Show visitors from EU countries a page with GDPR message using Cloudflare and .htaccess
@applicato
applicato / find_domain
Created September 26, 2018 13:03 — forked from sathishmanohar/find_domain
Find .com Domain availability from terminal
#!/bin/bash
while [ "$name" != "exit" ]
do
# Get the Domain Name from User
echo "What domain name do you want?: [Enter]"
read name
# Check if the input is not empty or just spaces
if [[ -z "${name// }" ]]; then
@applicato
applicato / stars
Created September 26, 2018 13:02 — forked from kensoh/stars
TagUI flow to print the list of your starred repos
// created this flow file to archive my starred repos
// it prints the list of starred repos by github user
// you can get TagUI here (macOS / Windows / Linux)
// https://github.com/kelaberetiv/TagUI#set-up
// usage #1 - copy or download this file, then run
// tagui stars github_userid quiet chrome
// usage #2 - if you want to run this gist directly
@applicato
applicato / gitcheck.sh
Created September 26, 2018 13:02 — forked from madprops/gitcheck.sh
Bash script to check if any of the git locations in a list have uncommitted changes and show output in a GUI alert box using gxmessage
#!/bin/bash
# Depends on the gxmessage package
# This is a script that will check all git repos in the location array
# Then it will check the output length of git diff
# If there's output in any of them it will show a red warning with their location
# If not it will show an "All good" message in green
# This is useful to keep various git repos in check with a simple command (or keypress if you map it)
@applicato
applicato / gash.py
Created September 26, 2018 13:01 — forked from giannitedesco/gash.py
Send secret messages to someone using their public ssh key
#!/usr/bin/python3
__copyright__ = "Copyright (c) 2018 Gianni Tedesco"
__licence__ = "GPLv3"
__doc__ = "Tool for sending secret messages using ssh keys"
from argparse import ArgumentParser
try:
import nacl.utils
from nacl.signing import SigningKey,VerifyKey
@applicato
applicato / license-badges.md
Created September 24, 2018 14:42 — forked from lukas-h/license-badges.md
License Badges for your Project

Markdown License badges

Collection of License badges for your Project's README file.
This list includes the most common open source and open data licenses.
Easily copy and paste the code under the badges into your Markdown files.

Notes

  • Badges are made with Shields.io.
  • This badges do not fully replace the license informations for your projects, they are only emblems for the README, that the user can see the License at first glance.  
  • 🇫🇷 Cette liste en français
  • Github has a new autodetection of the LICENSE file, which shows up the license at the repo overview
@applicato
applicato / license-badges.md
Created September 24, 2018 14:42 — forked from lukas-h/license-badges.md
License Badges for your Project

Markdown License badges

Collection of License badges for your Project's README file.
This list includes the most common open source and open data licenses.
Easily copy and paste the code under the badges into your Markdown files.

Notes

  • Badges are made with Shields.io.
  • This badges do not fully replace the license informations for your projects, they are only emblems for the README, that the user can see the License at first glance.  
  • 🇫🇷 Cette liste en français
  • Github has a new autodetection of the LICENSE file, which shows up the license at the repo overview
@applicato
applicato / Quirks of C.md
Created September 18, 2018 14:01 — forked from fay59/Quirks of C.md
Quirks of C

Here's a list of mildly interesting things about the C language that I learned over time. There are many more mildly interesting features of C++, but the language is literally known for being weird, whereas C is usually considered smaller and simpler, so this is (almost) only about C.

1. Combined type and variable/field declaration, inside a struct scope [https://godbolt.org/g/Rh94Go]

struct foo {
   struct bar {
       int x;
   } baz;
};
@applicato
applicato / clojure-programming-blog.md
Created September 7, 2018 16:19 — forked from zelark/clojure-programming-blog.md
#clojure #clojurescript #blog #grumpy.website

Clojure Programming: Blog

  • Part 1: Начало статического блога. Immutant, Ring, Compojure, HTML rendering через Rum
  • Part 2: Forms, middlewares, redirects, 404 and error handling
  • Part 3: id generator, loops, cookies, sessions, authorization, working w/ files, macros
  • Part 4: Cookies, рефакторинг, неймспейсы, RSS фид
  • Part 5: Infinite Scroll на JS, sitemap.xml, robots.txt
  • Part 6: Настраиваем CLJS окружение
  • Part 7: Переделываем форму редактирования на Rum, клиент+сервер-сайд рендеринг, EDN-сериализация данных
  • Part 8: CLJS, drag-n-drop upload, browser API, Rum mixins, local state
@applicato
applicato / pre-commit.sh
Created September 7, 2018 15:45 — forked from dahjelle/pre-commit.sh
Pre-commit hook for eslint, linting *only* staged changes.
#!/bin/bash
for file in $(git diff --cached --name-only | grep -E '\.(js|jsx)$')
do
git show ":$file" | node_modules/.bin/eslint --stdin --stdin-filename "$file" # we only want to lint the staged changes, not any un-staged changes
if [ $? -ne 0 ]; then
echo "ESLint failed on staged file '$file'. Please check your code and try again. You can run ESLint manually via npm run eslint."
exit 1 # exit with failure status
fi
done