Skip to content

Instantly share code, notes, and snippets.

View athaller's full-sized avatar
💭
Making Magic

athaller

💭
Making Magic
  • $date :: PHP :: Systems :: Dev Ops
  • East :: Web
View GitHub Profile
@taskylizard
taskylizard / fmhy.md
Last active June 7, 2025 15:37
/r/freemediaheckyeah, in one single file (view raw)
@dodying
dodying / favicon.md
Last active February 16, 2025 19:29
[Get Favicon] #api #favicon
  • DuckDuckGo https://icons.duckduckgo.com/ip2/{hostname}.ico
  • Google https://www.google.com/s2/favicons?domain_url={hostname}
  • Yandex https://favicon.yandex.net/favicon/{hostname1}/{hostname2}/
  • allesedv https://f1.allesedv.com/16/{hostname}
  • http://grab-favicons.herokuapp.com/api/v1/grab-favicons/?url={hostname}
  • https://besticon-demo.herokuapp.com/icon?url={hostname}&size=80..120..200
  • http://favicongrabber.com/service-api-reference
<?php
namespace DeliciousBrains\Admin;
use DeliciousBrains\DBI;
class ACF {
public function init() {
add_filter( 'acf/settings/save_json', array( $this, 'get_local_json_path' ) );
@jonico
jonico / Jenkinsfile
Last active March 5, 2025 22:51
Example for a full blown Jenkins pipeline script with CodeQL analysis steps, multiple stages, Kubernetes templates, shared volumes, input steps, injected credentials, heroku deploy, sonarqube and artifactory integration, Docker containers, multiple Git commit statuses, PR merge vs branch build detection, REST API calls to GitHub deployment API, …
#!groovy
import groovy.json.JsonOutput
import groovy.json.JsonSlurper
def label = "mypod-${UUID.randomUUID().toString()}"
podTemplate(label: label, yaml: """
spec:
containers:
- name: mvn
image: maven:3.3.9-jdk-8
@ipbastola
ipbastola / jq to filter by value.md
Last active May 29, 2025 00:52
JQ to filter JSON by value

JQ to filter JSON by value

Syntax: cat <filename> | jq -c '.[] | select( .<key> | contains("<value>"))'

Example: To get json record having _id equal 611

cat my.json | jq -c '.[] | select( ._id | contains(611))'

Remember: if JSON value has no double quotes (eg. for numeric) to do not supply in filter i.e. in contains(611)

@mpneuried
mpneuried / Makefile
Last active April 29, 2025 08:09
Simple Makefile to build, run, tag and publish a docker containier to AWS-ECR
# import config.
# You can change the default config with `make cnf="config_special.env" build`
cnf ?= config.env
include $(cnf)
export $(shell sed 's/=.*//' $(cnf))
# import deploy config
# You can change the default deploy config with `make cnf="deploy_special.env" release`
dpl ?= deploy.env
include $(dpl)
@alces
alces / ansible_local_playbooks.md
Last active June 3, 2025 22:54
How to run an Ansible playbook locally
  • using Ansible command line:
ansible-playbook --connection=local 127.0.0.1 playbook.yml
  • using inventory:
127.0.0.1 ansible_connection=local
@delaBruyne
delaBruyne / lth_configuration.install
Last active April 1, 2016 06:24
Drupal 7 - Useful hook_update_N
We couldn’t find that file to show.
@mrlesmithjr
mrlesmithjr / playbook.yml
Last active January 30, 2016 20:31
Ubuntu Desktop Like a Boss
---
- name: Set up Fresh Ubuntu Desktop
hosts: all
sudo: true
handlers:
- name: restart avahi-daemon
service:
name: avahi-daemon
state: restarted
- name: restart netatalk