Skip to content

Instantly share code, notes, and snippets.

View ashsaraga's full-sized avatar
🌈
Building tools only I'll wind up using.

Ash Saraga ashsaraga

🌈
Building tools only I'll wind up using.
View GitHub Profile
@liitfr
liitfr / README.md
Last active March 13, 2024 17:43
[how to revert 100644 → 100755 commits ?] #git #chmod

how to revert 100644 → 100755 commits

  • on your repo's root, run : find . -type f | xargs chmod -x
  • commit this change on files : commit -n -m 'fix: files permission from 100755 to 100644'
  • then with vim .git/config, set filemode option to false
[core]
        filemode = false
@whoisryosuke
whoisryosuke / Update-branch.md
Created September 17, 2019 17:38 — forked from santisbon/Update-branch.md
Bring your feature branch up to date with master. Deploying from Git branches adds flexibility. Bring your branch up to date with master and deploy it to make sure everything works. If everything looks good the branch can be merged. Otherwise, you can deploy your master branch to return production to its stable state.

Updating a feature branch

First we'll update your local master branch. Go to your local project and check out the branch you want to merge into (your local master branch)

$ git checkout master

Fetch the remote, bringing the branches and their commits from the remote repository. You can use the -p, --prune option to delete any remote-tracking references that no longer exist in the remote. Commits to master will be stored in a local branch, remotes/origin/master

@ollietreend
ollietreend / acf-php-to-json.php
Last active June 5, 2024 17:34
Convert Advanced Custom Fields Pro configuration from PHP to JSON.
<?php
/**
* Plugin Name: Convert ACF PHP to JSON
* Description: Convert Advanced Custom Fields Pro configuration from PHP to JSON.
*/
namespace ConvertAcfPhpToJson;
/**
* Add submenu item under 'Custom Fields'
@tyliec
tyliec / Terraria.md
Last active August 11, 2020 13:52
Terraria Server Setup Guide

This is a Terraria Server Setup Guide for Digital Ocean

This guide might not do everything the right way, but it works.

No bullshit. Straight up what I did to get it working. (Ubuntu 16.04 64bit)

ssh into your droplet

Update your shit

@jbgo
jbgo / Makefile
Created September 2, 2016 16:41
My vagrant setup for python flask apps
SHELL = /bin/bash
WORKDIR = /vagrant
PSQL = sudo -u postgres psql
DBNAME = changeme
DBUSER = changeme_user
DBPASS = secret
db/console:
$(PSQL) $(DBNAME)
@xndc
xndc / tunejack.sh
Last active May 18, 2024 04:04
Instant radio streaming script using the TuneIn API
#!/bin/bash
# tunejack.sh uses the TuneIn public API (at opml.radiotime.com) to search for
# a radio station, print out its details and try to play it somehow.
if [ "$#" -eq 0 ]; then
echo "$0: search for a radio station using the TuneIn API"
echo "Usage: $0 PATTERN"
exit 1
fi