Skip to content

Instantly share code, notes, and snippets.

@gino8080
gino8080 / gitlab-ci.yml
Created March 2, 2021 22:03
Publish your create-react-app website via Gitlab CI. tags: #gitlab #git #deploy #ci
image: node:6.5.0 # can be upgraded, depending on your node version used
pages:
stage: deploy
script:
- npm install
- npm run build
- rm -rf public
- mv build public
artifacts:
function get<T, K extends keyof T>(p: T, key: K): any {
return p[key]
}
@gino8080
gino8080 / launch.json
Created June 23, 2020 17:31 — forked from cecilemuller/launch.json
Run ts-node in VSCode Debugger
{
"version": "0.2.0",
"configurations": [
{
"name": "Example",
"type": "node",
"request": "launch",
"runtimeExecutable": "node",
"runtimeArgs": ["--nolazy", "-r", "ts-node/register/transpile-only"],
@gino8080
gino8080 / repeater-meta.php
Created June 4, 2020 15:01 — forked from izzygld/repeater-meta.php
Hooking up ACF repeater fields to the shema.
//acf stats repeater
array (
'key' => 'field_5a27ee3a83076',
'label' => 'Stats',
'name' => 'stats',
'type' => 'repeater',
'instructions' => '',
'required' => 0,
'conditional_logic' => 0,
'wrapper' => array (
@gino8080
gino8080 / update_git_repos.sh
Created August 1, 2018 09:11 — forked from douglas/update_git_repos.sh
Update all git repositories under a base directory
#!/bin/bash
# store the current dir
CUR_DIR=$(pwd)
# Let the person running the script know what's going on.
echo "\n\033[1mPulling in latest changes for all repositories...\033[0m\n"
# Find all git repositories and update it to the master latest revision
for i in $(find . -name ".git" | cut -c 3-); do
@gino8080
gino8080 / SqlDataReaderExtensions.cs
Created June 21, 2018 08:02 — forked from syed-afraz-ali/SqlDataReaderExtensions.cs
Convert SqlDataReader to Json String
// Requires Newtonsoft.Json to create JSON String
public static String ToJson(this SqlDataReader rdr)
{
StringBuilder sb = new StringBuilder();
StringWriter sw = new StringWriter(sb);
using (JsonWriter jsonWriter = new JsonTextWriter(sw))
{
jsonWriter.WriteStartArray();
// Includes functions for exporting active sheet or all sheets as JSON object (also Python object syntax compatible).
// Tweak the makePrettyJSON_ function to customize what kind of JSON to export.
var FORMAT_ONELINE = 'One-line';
var FORMAT_MULTILINE = 'Multi-line';
var FORMAT_PRETTY = 'Pretty';
var LANGUAGE_JS = 'JavaScript';
var LANGUAGE_PYTHON = 'Python';
@gino8080
gino8080 / Gruntfile.js
Created September 28, 2016 18:12 — forked from jshawl/Gruntfile.js
Grunt + Sass + Autoprefixer
module.exports = function(grunt) {
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
sass: {
dist: {
options:{
style:'compressed'
},
files: {
'css/style.css' : 'scss/style.scss'
@gino8080
gino8080 / multi-ipn.php
Created July 1, 2016 23:32 — forked from anointed/multi-ipn.php
Paypal multiple IPN's
<?php
/*
* This is a PayPal IPN (Instant Payment Notification) broadcaster
* Since PayPal does not provide any straightforward way to add
* multiple IPN listeners we'll have to create a central IPN
* listener that will broadcast (or filter and dispatch) Instant
* Payment Notifications to different destinations (IPN listeners)
*
* http://codeseekah.com/2012/02/11/how-to-setup-multiple-ipn-receivers-in-paypal/
*

Basic Moves

Function Shortcut
Move back one character Ctrl + b
Move forward one character Ctrl + f
Delete current character Ctrl + d
Delete previous character Backspace
Undo Ctrl + -