Skip to content

Instantly share code, notes, and snippets.

View calebeaires's full-sized avatar
👨‍💻
on vue

Calebe Aires calebeaires

👨‍💻
on vue
View GitHub Profile
@koakh
koakh / gist:fbbc37cde630bedcf57acfd4d6a6956b
Last active April 6, 2024 02:04
SurrealDB : How to use signin and signup (server + client nodesjs)
**As a developer you have complete control over the signup and signin functionality...**
```shell
$ surreal sql --conn http://localhost:8000 --user root --pass root --ns test --db test
```
```sql
-- optional : this is the default see --ns test --db test start server flags
-- USE NS test DB test;
@phanan
phanan / MyList.vue
Last active February 2, 2023 17:10
Virtual scroller with Vue Composition API
<template>
<VirtualScroller v-slot="{ item }" :item-height="35" :items="myMassiveArray">
<div :item="item" :key="item.id">{{ item.details.i.guess? }}</div>
</VirtualScroller>
</template>
@coltenkrauter
coltenkrauter / html-input-remove-chrome-autofill-background.css
Last active August 2, 2024 02:46
Remove Chrome's autofill background color on HTML inputs. This unique solution makes the background color to transparent rather then a solid color.
// Remove chrome autofill color from inputs
input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus,
input:-webkit-autofill:active {
transition: background-color 5000000s ease-in-out 0s;
}
# Credit: https://stackoverflow.com/questions/2781549/removing-input-background-colour-for-chrome-autocomplete#answer-29350537
@dtheodor
dtheodor / install_mariadb_columnstore_ubuntu_16_04.md
Last active July 25, 2018 13:24
Install MariaDB Columnstore on Ubuntu 16.04

Following instructions at https://mariadb.com/kb/en/mariadb/preparing-for-columnstore-installation/

Install

sudo apt-get -y install libboost-all-dev expect perl openssl file sudo libdbi-perl libreadline-dev libdbd-mysql-perl
wget https://downloads.mariadb.com/ColumnStore/1.0.7/ubuntu/dists/xenial/main/binary_amd64/mariadb-columnstore-1.0.7-1-xenial.x86_64.deb.tar.gz
tar zxf mariadb-columnstore-1.0.7-1-xenial.x86_64.deb.tar.gz
sudo dpkg -i *.deb
sudo /usr/local/mariadb/columnstore/bin/postConfigure
@bekce
bekce / README.md
Created February 21, 2017 13:36
ldap server with mysql backend

I wanted to build an LDAP server that queries a MySQL server to fetch users and check their passwords. It is mainly used for old software that does not work with custom OAuth2 providers. Redmine is an example of this.

Instructions:

  1. Create the database and table with insert.sql
@srph
srph / oauth.js
Created February 21, 2016 13:50
axios: interceptor which includes your oauth token in every request as an Authorization header
import axios from 'axios';
// You can use any cookie library or whatever
// library to access your client storage.
import cookie from 'cookie-machine';
axios.interceptors.request.use(function(config) {
const token = cookie.get(__TOKEN_KEY__);
if ( token != null ) {
config.headers.Authorization = `Bearer ${token}`;
@novemberborn
novemberborn / setup.md
Created January 7, 2016 15:05
OS X Redirect ports 80 and 443 to 8080 and 8443 respectively

Changes with .dev domains in mind.

Create /etc/pf.anchors/dev, containing:

rdr pass inet proto tcp from any to any port 80 -> 127.0.0.1 port 8080
rdr pass inet proto tcp from any to any port 443 -> 127.0.0.1 port 8443