Skip to content

Instantly share code, notes, and snippets.

Git Cheat Sheet

Commands

Getting Started

git init

or

@wordpressandphpdeveloper
wordpressandphpdeveloper / Show All Tables in a MySQl Schema
Last active September 6, 2021 12:26
Php script to show all tables in a MySQL schema
<?php
//open database connection
$mysqli = new mysqli(<host>,<username>,<password>,<schema>);
//Display error message
if ($mysqli->connect_error) {
die('Error : ('. $mysqli->connect_errno .') '. $mysqli->connect_error);
}
$sql="SELECT TABLE_NAME FROM information_schema.TABLES WHERE TABLE_SCHEMA = '<schema name>'";
@Nemitek
Nemitek / keras_prediction.py
Created October 22, 2015 04:11
Predicting sequences of vectors (regression) in Keras using RNN - LSTM (original by danielhnyk.cz) - fixed for Keras 0.2.0
import pandas as pd
from random import random
flow = (list(range(1,10,1)) + list(range(10,1,-1)))*1000
pdata = pd.DataFrame({"a":flow, "b":flow})
pdata.b = pdata.b.shift(9)
data = pdata.iloc[10:] * random() # some noise
import numpy as np
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@zas
zas / install_intelr_graphic_linux_firmware.sh
Created September 9, 2016 00:06
Fix "W: Possible missing firmware /lib/firmware/i915/kbl_dmc_ver1.bin for module i915_bpo" (Ubuntu 16.04, kernel 4.4)
#!/bin/bash
cd
wget https://01.org/sites/default/files/downloads/intelr-graphics-linux/sklgucver61.tar.bz2 && \
tar xvjf sklgucver61.tar.bz2 && cd skl_guc_ver6_1/ && sudo ./install.sh
cd
wget https://01.org/sites/default/files/downloads/intelr-graphics-linux/kbldmcver101.tar.bz2 && \
@KonradLinkowski
KonradLinkowski / deploy.yml
Last active September 24, 2022 11:35
Github Pages auto-deploy
name: Build and Deploy
on:
push:
branches:
- main # change to your desired branch name
jobs:
build-and-deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2