Skip to content

Instantly share code, notes, and snippets.

View xlanex6's full-sized avatar
🎿
Code web apps from the alps

Alex Duval xlanex6

🎿
Code web apps from the alps
View GitHub Profile
@danielroe
danielroe / settings.json
Last active May 4, 2024 08:55
VScode settings for a minimal UI
{
// Disable telemetry
"telemetry.telemetryLevel": "off",
// Zen mode
"zenMode.fullScreen": false,
"zenMode.hideTabs": true,
"zenMode.centerLayout": false,
// Theming
"workbench.iconTheme": "city-lights-icons-vsc",
"editor.fontFamily": "Dank Mono",
@joyrexus
joyrexus / README.md
Last active May 3, 2024 10:41 — forked from liamcurry/gist:2597326
Vanilla JS equivalents of jQuery methods

Sans jQuery

Events

// jQuery
$(document).ready(function() {
  // code
})
@veggiemonk
veggiemonk / .gitconfig
Last active February 19, 2024 16:49
simple zshrc config file with Oh-My-ZSH
[user]
name = Julien Bisconti
email = ******
[core]
excludesfile = ~/.gitignore
pager = diff-so-fancy | less --tabs=1,5 -R
editor = /usr/bin/vim
[alias]
wow = log --all --graph --decorate --oneline --simplify-by-decoration
@karantir
karantir / index.js
Created January 26, 2019 09:09
Play sound with Howler from blob stored in IndexedDB
(function () {
// IndexedDB
var indexedDB = window.indexedDB || window.webkitIndexedDB || window.mozIndexedDB || window.OIndexedDB || window.msIndexedDB,
IDBTransaction = window.IDBTransaction || window.webkitIDBTransaction || window.OIDBTransaction || window.msIDBTransaction,
dbVersion = 2.0;
// Create/open database
var request = indexedDB.open("soundScapeFiles", dbVersion),
db,
createObjectStore = function (dataBase) {
@zulhfreelancer
zulhfreelancer / heroku_pg_db_reset.md
Last active January 29, 2024 10:09
How to reset PG Database on Heroku (for Rails app)?

It's important to note that running this reset will drop any existing data you have in the application

How to reset PG Database on Heroku?

  • Step 1: heroku restart
  • Step 2: heroku pg:reset DATABASE (no need to change the DATABASE)
  • Step 3: heroku run rake db:migrate
  • Step 4: heroku run rake db:seed (if you have seed)

One liner

@islishude
islishude / caret.js
Last active November 26, 2023 00:16
[DEPRECATED]get/set caret position in contentEditable or textarea/input element(JavaScript)
/**
* @file get/set caret position and insert text
* @author islishude
* @license MIT
*/
export class Caret {
/**
* get/set caret position
* @param {HTMLColletion} target
*/
@Sinequanonh
Sinequanonh / telegram-bot.js
Last active October 25, 2023 06:09
Nodejs script to send Telegram push notifications
const TelegramBot = require('node-telegram-bot-api');
// replace the value below with the Telegram token you receive from @BotFather
const token = YOUR_TOKEN;
// read the doc from https://github.com/yagop/node-telegram-bot-api to know how to catch the chatId
const chatId = CHAT_ID;
const bot = new TelegramBot(token, { polling: false });
const telegrambot = (message, json) => {
@tablekat
tablekat / main.ts
Created June 30, 2016 20:24
Making gmail push notifications to webhook
import * as request from 'request';
import * as fs from 'fs';
import * as readline from 'readline';
var google = require('googleapis');
var googleAuth = require('google-auth-library');
/*************** STEPS
- made a project on https://console.cloud.google.com/cloudpubsub/topicList?project=testmabs thing?
@ssaunier
ssaunier / README.md
Last active August 1, 2023 21:28
Adding Le Wagon to your Linkedin Profil
@liborvanek
liborvanek / transition.js
Last active April 26, 2023 11:43
Page transition mixin for Nuxt.js with GreenSock GSAP
import { TimelineMax, TweenMax, Power2, Back } from 'gsap'
let curtainsOpenTimeline = () => {
return new TimelineMax()
.set('.curtains', { transformOrigin: '0%' })
.fromTo('.curtains', 0.6, { scaleX: 0 }, { scaleX: 1, ease: Power2.easeInOut })
.fromTo('.curtains-logo', 0.3, { x: '-100%', autoAlpha: 0 }, { x: '-50%', autoAlpha: 1, ease: Power2.easeInOut }, '-=0.45')
}
let curtainsCloseTimeline = () => {