Skip to content

Instantly share code, notes, and snippets.

View joemar-tagpuno's full-sized avatar

Joemar Tagpuno joemar-tagpuno

View GitHub Profile
https://forum.manjaro.org/t/keyring-for-chromium-is-pointless/4328/9
Transfer repositories from GitLab to GitHub if the need be.
https://stackoverflow.com/questions/22265837/transfer-git-repositories-from-gitlab-to-github-can-we-how-to-and-pitfalls-i#22266000
@joemar-tagpuno
joemar-tagpuno / Git push deployment in 7 easy steps.md
Created August 2, 2019 04:01 — forked from thomasfr/Git push deployment in 7 easy steps.md
7 easy steps to automated git push deployments. With small and configurable bash only post-receive hook
@joemar-tagpuno
joemar-tagpuno / cloudSettings
Last active May 8, 2020 01:01
Visual Studio Code Settings Sync Gist
{"lastUpload":"2020-05-08T01:01:23.292Z","extensionVersion":"v3.4.3"}
// Get the template HTML and remove it from the doumenthe template HTML and remove it from the doument
var previewNode = document.querySelector("#template");
previewNode.id = "";
var previewTemplate = previewNode.parentNode.innerHTML;
previewNode.parentNode.removeChild(previewNode);
var myDropzone = new Dropzone(document.body, { // Make the whole body a dropzone
url: "/target-url", // Set the url
thumbnailWidth: 80,
thumbnailHeight: 80,
<!-- HTML heavily inspired by http://blueimp.github.io/jQuery-File-Upload/ -->
<div class="table table-striped" class="files" id="previews">
<div id="template" class="file-row">
<!-- This is used as the file preview template -->
<div>
<span class="preview"><img data-dz-thumbnail /></span>
</div>
<div>
<p class="name" data-dz-name></p>
@joemar-tagpuno
joemar-tagpuno / docker-help.md
Created November 23, 2018 05:33 — forked from bradtraversy/docker-help.md
Docker Commands, Help & Tips

Docker Commands, Help & Tips

Show commands & management commands

$ docker

Docker version info

@joemar-tagpuno
joemar-tagpuno / mysql-rename-db.sh
Created January 24, 2018 06:02 — forked from tadas-s/mysql-rename-db.sh
MySQL database rename script
#!/bin/bash
# Disclaimer - make backups, use at your own risk.
#
# Based on this comment: http://stackoverflow.com/a/13944924/843067
# Views and stored procedures have to be done separately.
OLDDB="old_db_name"
NEWDB="new_db_name"
MYSQL="mysql -u root -pyour_password "
<?php
$db_con = mysqli_connect("localhost", "username", "password", "database");
$result = $db_con->query('SELECT * FROM some_table');
if (!$result) die('Couldn\'t fetch records');
$num_fields = mysqli_num_fields($result);
$headers = array();
while ($fieldinfo = mysqli_fetch_field($result)) {
$headers[] = $fieldinfo->name;
}
$fp = fopen('php://output', 'w');