Skip to content

Instantly share code, notes, and snippets.

View apaciuk's full-sized avatar
🎯
Focusing

Paul Anthony McGowan apaciuk

🎯
Focusing
View GitHub Profile
@apaciuk
apaciuk / PDO_Cheatsheet.php
Created March 30, 2019 10:21 — forked from hanvari/PDO_Cheatsheet.php
PHP PDO Cheatsheet
<?php
/*
Reference:
http://code.tutsplus.com/tutorials/why-you-should-be-using-phps-pdo-for-database-access--net-12059
*/
function connect(){
/*
@apaciuk
apaciuk / media-query.css
Created April 26, 2019 20:21 — forked from gokulkrishh/media-query.css
CSS Media Queries for Desktop, Tablet, Mobile.
/*
##Device = Desktops
##Screen = 1281px to higher resolution desktops
*/
@media (min-width: 1281px) {
//CSS
@apaciuk
apaciuk / gist:315424b437da11fbec3c8d3a62af3b88
Created June 28, 2019 17:36 — forked from bradleysa/gist:7d1448253097784daf94
WooCommerce: Add Continue Shopping Button on Cart Page
<?php
/**
* Add Continue Shopping Button on Cart Page
* Add to theme functions.php file or Code Snippets plugin
*/
add_action( 'woocommerce_before_cart_table', 'woo_add_continue_shopping_button_to_cart' );
function woo_add_continue_shopping_button_to_cart() {
@apaciuk
apaciuk / node-and-npm-in-30-seconds.sh
Created August 25, 2019 10:47 — forked from isaacs/node-and-npm-in-30-seconds.sh
Use one of these techniques to install node and npm without having to sudo. Discussed in more detail at http://joyeur.com/2010/12/10/installing-node-and-npm/ Note: npm >=0.3 is *safer* when using sudo.
echo 'export PATH=$HOME/local/bin:$PATH' >> ~/.bashrc
. ~/.bashrc
mkdir ~/local
mkdir ~/node-latest-install
cd ~/node-latest-install
curl http://nodejs.org/dist/node-latest.tar.gz | tar xz --strip-components=1
./configure --prefix=~/local
make install # ok, fine, this step probably takes more than 30 seconds...
curl https://www.npmjs.org/install.sh | sh
@apaciuk
apaciuk / bulma-form.html
Created August 25, 2019 20:30 — forked from hrmsk66/bulma-form.html
Bulma Simple Form
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Hello Bulma!</title>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/bulma/0.7.1/css/bulma.min.css">
<script defer src="https://use.fontawesome.com/releases/v5.0.7/js/all.js"></script>
</head>
<body>
@apaciuk
apaciuk / stream_to_youtube.sh
Created November 19, 2019 14:18 — forked from olasd/stream_to_youtube.sh
Stream video to youtube via ffmpeg
#! /bin/bash
#
# Diffusion youtube avec ffmpeg
# Configurer youtube avec une résolution 720p. La vidéo n'est pas scalée.
VBR="2500k" # Bitrate de la vidéo en sortie
FPS="30" # FPS de la vidéo en sortie
QUAL="medium" # Preset de qualité FFMPEG
YOUTUBE_URL="rtmp://a.rtmp.youtube.com/live2" # URL de base RTMP youtube
@apaciuk
apaciuk / stream_to_youtube.sh
Created November 19, 2019 14:18 — forked from olasd/stream_to_youtube.sh
Stream video to youtube via ffmpeg
#! /bin/bash
#
# Diffusion youtube avec ffmpeg
# Configurer youtube avec une résolution 720p. La vidéo n'est pas scalée.
VBR="2500k" # Bitrate de la vidéo en sortie
FPS="30" # FPS de la vidéo en sortie
QUAL="medium" # Preset de qualité FFMPEG
YOUTUBE_URL="rtmp://a.rtmp.youtube.com/live2" # URL de base RTMP youtube
@apaciuk
apaciuk / fetch-api-examples.md
Created February 22, 2020 15:26 — forked from justsml/fetch-api-examples.md
JavaScript Fetch API Examples
@apaciuk
apaciuk / fetch-api-examples.md
Created February 22, 2020 15:26 — forked from justsml/fetch-api-examples.md
JavaScript Fetch API Examples
@apaciuk
apaciuk / RAILS_CHEATSHEET.md
Created July 17, 2021 07:36 — forked from mdang/RAILS_CHEATSHEET.md
Ruby on Rails Cheatsheet

Ruby on Rails Cheatsheet

Architecture

Create a new application

Install the Rails gem if you haven't done so before