Skip to content

Instantly share code, notes, and snippets.

🎯
Focusing

Reneicko Getten htkcodes

  • Jamaica
View GitHub Profile
View gitsnippets.js
/**Amending the most recent commit message
//git commit --amend
//will open your editor, allowing you to change the commit message of the most recent commit. Additionally, you can set the commit message directly in the command line with:
https://stackoverflow.com/questions/179123/how-to-modify-existing-unpushed-commits
*/
git commit --amend -m "New commit message"
//Getting all from git repo
View string stuff.js
var kek;
var one = 1;
var two = 2;
var three = 3;
var four = 4;
kek = "<a href=\"#\" onclick=\"wi_open_report(this,'".concat(one, "','1','").concat(two, "','").concat(two, "','4','n')\"> ").concat(one, "</a>");
@htkcodes
htkcodes / gitflow-breakdown.md
Created Nov 22, 2018 — forked from JamesMGreene/gitflow-breakdown.md
A comparison of using `git flow` commands versus raw `git` commands.
View gitflow-breakdown.md

Initialize

gitflow git
git flow init git init
  git commit --allow-empty -m "Initial commit"
  git checkout -b develop master

Connect to the remote repository

View main.js
$(document).ready(function () {
console.log("ready!");
startTime();
});
function startTime() {
var today = new Date();
var h = today.getHours();
View main.scss
@import url('https://fonts.googleapis.com/css?family=Comfortaa|Megrim|Montserrat');
$main-color:#0f6ffd;
$c-gray: #8d959b;
$c-light: #f9f9f9;
$c-dark: #404060;
$c-red: #e96575;
$c-blue: #4b96f0;
@mixin boxsizing-borderbox {
@htkcodes
htkcodes / commands.js
Created Aug 13, 2018
USEFUL COMMANDS
View commands.js
browser-sync start --server --files "*.html, css/*.css"
@htkcodes
htkcodes / pouch.js
Last active Mar 21, 2018
PouchDB CRUD COMMANDS
View pouch.js
//Creating the database object
var db = new PouchDB('http://localhost:5984/my_database');
//Database information
//Preparing the document
doc = {
_id : '001',
name: 'Raju',
age : 23,
designation : 'Designer'
View session_example_config.php
<?php
define('DB_USERNAME', 'root');
define('DB_PASSWORD', 'Hoang123');
define('DB_NAME', 'session_example');
define('DB_SERVER', 'localhost');
/* Attempt to connect to MySQL database */
/** @var mysqli $mysqli */
$mysqli = new mysqli(DB_SERVER, DB_USERNAME, DB_PASSWORD, DB_NAME);
View onesignal.js
/* OneSignal.on('subscriptionChange', function(isSubscribed) {
if (isSubscribed) {
console.log(isSubscribed);
// The user is subscribed
// Either the user subscribed for the first time
// Or the user was subscribed -> unsubscribed -> subscribed
OneSignal.getUserId( function(userId) {
$.post("/users/onesignal",{
onesignal_id:userId
},function(response){
View useful.pug
- var n=0;
while n<item.quantity
option(value=n++) Option #{n}
You can’t perform that action at this time.