Skip to content

Instantly share code, notes, and snippets.

Avatar
🐐
Better everyday

Daniels Teddy bonniss

🐐
Better everyday
View GitHub Profile
View ansible-macos-homebrew-packages.yml
---
- name: Install MacOS Packages
hosts: localhost
become: false
vars:
brew_cask_packages:
- atom
- docker
- dropbox
- firefox
View gl-param-datasource.json
[
{
"labelKey": "label",
"valueKey": "value",
"data": [
{
"label": "Handmade",
"value": "car"
},
{
@bonniss
bonniss / project-create.sh
Created Feb 11, 2022 — forked from francoisromain/project-create.sh
A bash script to create a Git post-receive hook to deploy after a Git push
View project-create.sh
#!/bin/bash
# source: https://gist.github.com/francoisromain/58cabf43c2977e48ef0804848dee46c3
# and another script to delete the directories created by this script
# project-delete.sh: https://gist.github.com/francoisromain/e28069c18ebe8f3244f8e4bf2af6b2cb
# Call this file with `bash ./project-create.sh project-name`
# - project-name is mandatory
# This will creates 4 directories and a git `post-receive` hook.
View gist:bf9d54eb06c21bf1456300f28011f400
if ("undefined" == typeof ZotataPlayUserID) var ZotataPlayUserID = "";
if ("undefined" == typeof ZotataPlayAuthKey) var ZotataPlayAuthKey = "";
if ("undefined" == typeof debug) var debug = -1 != location.hostname.indexOf("t.dragonbound.net");
var VERSION = 101,
SERVER_ADDRESS = -1 != location.hostname.indexOf("t.dragonbound.net") ? "http://t.dragonbound.net:9000" : "http://game.dragonbound.net:80",
LOCATION_TYPE_UNKNOWN = "unknown",
LOCATION_TYPE_CHANNEL = "channel",
LOCATION_TYPE_ROOM = "room",
ROOM_STATUS_WAITING = "W",
ROOM_STATUS_FULL = "F",
@bonniss
bonniss / dataset-1.json
Last active Oct 20, 2021
Dummy GA User Flows
View dataset-1.json
{"filter":{"countries":{"id":"viet-nam","name":"Việt Nam"}},"meta":{"createAt":"2021-10-20T03:04:40.373Z"},"cols":[{"level":0,"nodes":[{"pageId":"page-khach-hang-than-thiet","id":"0-page-khach-hang-than-thiet"},{"pageId":"page-ho-tro-tien-ban","id":"0-page-ho-tro-tien-ban"},{"pageId":"page-chung-khoan-upcom","id":"0-page-chung-khoan-upcom"},{"pageId":"page-sao-ke-truc-tuyen","id":"0-page-sao-ke-truc-tuyen"},{"pageId":"page-others","id":"0-page-others"}]},{"level":1,"nodes":[{"pageId":"page-khach-hang-than-thiet","id":"1-page-khach-hang-than-thiet"},{"pageId":"page-trang-chu","id":"1-page-trang-chu"},{"pageId":"page-dat-lenh","id":"1-page-dat-lenh"},{"pageId":"page-chung-khoan-phai-sinh","id":"1-page-chung-khoan-phai-sinh"},{"pageId":"page-others","id":"1-page-others"}]},{"level":2,"nodes":[{"pageId":"page-mo-tai-khoan","id":"2-page-mo-tai-khoan"},{"pageId":"page-sao-ke-truc-tuyen","id":"2-page-sao-ke-truc-tuyen"},{"pageId":"page-dang-ky-quyen-mua","id":"2-page-dang-ky-quyen-mua"},{"pageId":"page-tai-lieu-huon
@bonniss
bonniss / README.md
Created Oct 8, 2021 — forked from lopspower/README.md
Hexadecimal color code for transparency
View README.md

Hexadecimal color code for transparency

Twitter

How to set transparency with hex value ?

For example, you want to set 40% alpha transparence to #000000 (black color), you need to add 66 like this #66000000.

Download This sample on Google Play Store

@bonniss
bonniss / curl.md
Created Jul 15, 2021 — forked from subfuzion/curl.md
curl POST examples
View curl.md

Common Options

-#, --progress-bar Make curl display a simple progress bar instead of the more informational standard meter.

-b, --cookie <name=data> Supply cookie with request. If no =, then specifies the cookie file to use (see -c).

-c, --cookie-jar <file name> File to save response cookies to.

@bonniss
bonniss / array.js
Last active Oct 24, 2020
Useful snippets in Javascript for up and running project. @link: https://github.com/bootstrap-vue/bootstrap-vue/tree/dev/src/utils
View array.js
// @link: https://github.com/bootstrap-vue/bootstrap-vue/blob/dev/src/utils/array.js
const from = (...args) => Array.from(...args)
const isArray = val => Array.isArray(val)
const arrayIncludes = (array, value) => array.indexOf(value) !== -1
const concat = (...args) => Array.prototype.concat.apply([], args)
export const createAndFillArray = (size, value) => Array(size).fill(value)
@bonniss
bonniss / better-sqlite3-cheatsheet.md
Last active Jul 12, 2021
better-sqlite3 cheatsheet
View better-sqlite3-cheatsheet.md

Refs:

// Init new db
// If the database file does not exist, it is created
// This happens synchronously, which means you can start executing queries right away
const Database = require('better-sqlite3');