gitflow | git |
---|---|
git flow init |
git init |
git commit --allow-empty -m "Initial commit" |
|
git checkout -b develop master |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let getMyBrowserDetails = async () => { | |
async function myIP() { | |
let response = await fetch("https://api.db-ip.com/v2/free/self"); | |
return await response.json() | |
} | |
const ipData = await myIP() | |
return { | |
ip: ipData.ipAddress, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import time | |
import os | |
from pathlib import Path | |
from datetime import timedelta | |
CMD_FILE_COPY = 'cp {} {}' | |
CMD_DIR_COPY = 'cp -r {} {}' | |
CMD_DEL = 'rm -fr {}' | |
SSD_SINGLE_FILE = Path('/path/to/big/file.ext') # REPLACE THIS |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// Original from https://gist.github.com/magnetikonline/650e30e485c0f91f2f40 | |
class DumpHTTPRequestToFile | |
{ | |
public function execute($targetFile, $append = true): void | |
{ | |
$data = sprintf( | |
"%s\n%s %s %s\n\nHTTP headers:\n", | |
date("Y-m-d H:i:s"), |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
DO $$ DECLARE | |
r RECORD; | |
BEGIN | |
FOR r IN (SELECT tablename FROM pg_tables WHERE schemaname = current_schema()) LOOP | |
EXECUTE 'DROP TABLE IF EXISTS ' || quote_ident(r.tablename) || ' CASCADE'; | |
END LOOP; | |
END $$; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# delete local tag '12345' | |
git tag -d 12345 | |
# delete remote tag '12345' (eg, GitHub version too) | |
git push origin :refs/tags/12345 | |
# alternative approach | |
git push --delete origin tagName | |
git tag -d tagName |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FILE_INDEX=1 | |
for PATTERN in pattern_*.png | |
do | |
convert -quality 90 -size 550x145 tile:"$PATTERN" slider_bg_"$FILE_INDEX".jpg | |
convert -quality 90 -size 550x175 tile:"$PATTERN" catcher_bg_"$FILE_INDEX".jpg | |
FILE_INDEX=$(($FILE_INDEX+1)) | |
done |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# based on https://gist.github.com/idleberg/6c8a563e248103baaa20 | |
# SETTINGS | |
# ======== | |
# Location of your Dropbox folder | |
dropbox_folder="/home/myname/Dropbox" | |
# Location of dropbox.py (http://www.dropboxwiki.com/tips-and-tricks/using-the-official-dropbox-command-line-interface-cli) | |
dropbox_script="/usr/bin/dropbox" |