Skip to content

Instantly share code, notes, and snippets.

View killerwolf's full-sized avatar

Hamdi LAADHARI killerwolf

View GitHub Profile
@jcaraballo
jcaraballo / git-branch-between-different-repositories.md
Created March 6, 2012 01:05
How to fork a github repository in bitbucket

#Create bitbucket branch

##Create local branch

$ git checkout -b sync
Switched to a new branch 'sync'
$ git branch
  master
* sync
@rothgar
rothgar / main.yml
Last active April 28, 2025 04:18
Generate /etc/hosts with Ansible
# Idempotent way to build a /etc/hosts file with Ansible using your Ansible hosts inventory for a source.
# Will include all hosts the playbook is run on.
# Inspired from http://xmeblog.blogspot.com/2013/06/ansible-dynamicaly-update-etchosts.html
- name: "Build hosts file"
lineinfile: dest=/etc/hosts regexp='.*{{ item }}$' line="{{ hostvars[item].ansible_default_ipv4.address }} {{item}}" state=present
when: hostvars[item].ansible_default_ipv4.address is defined
with_items: groups['all']
@Mika-
Mika- / gist:185c8d777aab3ebba548
Created February 11, 2015 15:26
Resize and convert image to web optimized jpg with imagemagick and mozjpeg
convert source.png -resize 1920x1080 -background white -flatten TGA:- | cjpeg -quality 90 -targa -outfile compressed.jpg
@travishegner
travishegner / haproxy2apache
Last active May 6, 2022 15:44
A quick bash one liner to convert haproxy logs to something like apache logs so that logstalgia can read them
tail -f log | stdbuf -o0 awk '{print $9" "$6" - - "$7" "$18" "$19" "$20" "$11" "$12}' | sed -u "s/:[0-9]\{4,5\}//g" | sed -u "s/\(:[0-6][0-9]\)\.[0-9]\{3\}/\\1 -400/g" | logstalgia --sync --paddle-mode vhost
@rhewitt22
rhewitt22 / roughdraft-1.md
Created January 12, 2016 15:24
Publish a demo to GitHub Pages

Publish a demo to GitHub pages

Most projects on GitHub have a .gitignore file that prevents generated or distribution files from being checked into version control. This makes sense as they are completely dependent on the source files used to generate them.

If you have ever wanted to quickly post a demo of a project on GitHub using the free GitHub Pages service without commiting distribution files you're in luck.

If you use npm scripts as your build tool you can quickly publish a demo with one line using gh-pages from npm.

// Install Dependencies
@MinDBreaK
MinDBreaK / .env
Last active November 20, 2024 11:38
Simple Hashicorp Vault Parameter Resolver for Symfony
# Your env var to resolve : kvStore:key[:version]
VAULT_TEST=api:test
@architjn
architjn / debugging-process.mdc
Created June 9, 2025 06:52
Instructs Cursor to add debug logs, use browser tools for bug-fixing, remove logs after resolution, and make minimal changes.
---
description:
globs:
alwaysApply: true
---
# Debugging Rule for Bug-Fixing Requests
This rule ensures that when a user request involves solving a bug, Cursor adds minimal debug logs, leverages browser-based debugging tools, removes logs after resolution, and makes only the minimal changes necessary.
## Rule Instructions