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 November 16, 2024 07:02
/r/freemediaheckyeah, in one single file (view raw)
@dodying
dodying / favicon.md
Last active September 3, 2024 09:40
[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 November 15, 2024 02:16
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 September 3, 2024 14:40
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 August 22, 2024 10:36
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 November 9, 2024 05:41
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