Skip to content

Instantly share code, notes, and snippets.

View annymosse's full-sized avatar
🇵🇸
I'm busy ,Slow to respond.

Abdelkarim Ben Hamida annymosse

🇵🇸
I'm busy ,Slow to respond.
View GitHub Profile
@annymosse
annymosse / background.js
Created May 8, 2021 21:50 — forked from danharper/background.js
Bare minimum Chrome extension to inject a JS file into the given page when you click on the browser action icon. The script then inserts a new div into the DOM.
// this is the background code...
// listen for our browerAction to be clicked
chrome.browserAction.onClicked.addListener(function (tab) {
// for the current tab, inject the "inject.js" file & execute it
chrome.tabs.executeScript(tab.ib, {
file: 'inject.js'
});
});
@annymosse
annymosse / gist:24d39160cda7ea56c8fe975a160d8208
Created November 22, 2020 15:18 — forked from rxaviers/gist:7360908
Complete list of github markdown emoji markup

People

:bowtie: :bowtie: 😄 :smile: 😆 :laughing:
😊 :blush: 😃 :smiley: ☺️ :relaxed:
😏 :smirk: 😍 :heart_eyes: 😘 :kissing_heart:
😚 :kissing_closed_eyes: 😳 :flushed: 😌 :relieved:
😆 :satisfied: 😁 :grin: 😉 :wink:
😜 :stuck_out_tongue_winking_eye: 😝 :stuck_out_tongue_closed_eyes: 😀 :grinning:
😗 :kissing: 😙 :kissing_smiling_eyes: 😛 :stuck_out_tongue:
@annymosse
annymosse / 99-noto-mono-color-emoji.conf
Created November 1, 2020 09:24 — forked from IgnoredAmbience/99-noto-mono-color-emoji.conf
Noto Emoji Color fontconfig for Konsole
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
<!--
Noto Mono + Color Emoji Font Configuration.
Currently the only Terminal Emulator I'm aware that supports colour fonts is Konsole.
Usage:
0. Ensure that the Noto fonts are installed on your machine.
1. Install this file to ~/.config/fontconfig/conf.d/99-noto-mono-color-emoji.conf
@annymosse
annymosse / index.html
Created June 13, 2020 14:49 — forked from fcingolani/index.html
How to render a full PDF using Mozilla's pdf.js
<html>
<body>
<!-- really dirty! this is just a test drive ;) -->
<script type="text/javascript" src="https://raw.github.com/mozilla/pdf.js/gh-pages/build/pdf.js"></script>
<script type="text/javascript">
function renderPDF(url, canvasContainer, options) {
var options = options || { scale: 1 };
@annymosse
annymosse / cinfo.vbs
Last active May 31, 2020 05:57 — forked from cornfred/cinfo.vbs
VBScript to gather windows computer information via WMI. Can take a Run it with:cscript cinfo.vbs COMPUTERNAMEORcscript cinfo.vbs
if Wscript.Arguments.count > 0 then
strComputer = Wscript.Arguments(0)
else
Wscript.StdOut.Write "Please enter a computer name: "
strComputer = Wscript.StdIn.ReadLine
end if
Set objWMIService = GetObject("winmgmts:" _
& "{impersonationLevel=impersonate}!\\" _
& strComputer & "\root\cimv2")

1. Clone your fork:

git clone git@github.com:YOUR-USERNAME/YOUR-FORKED-REPO.git

2. Add remote from original repository in your forked repository:

cd into/cloned/fork-repo
git remote add upstream git://github.com/ORIGINAL-DEV-USERNAME/REPO-YOU-FORKED-FROM.git
git fetch upstream
@annymosse
annymosse / Knex-Migrations-Seeding.md
Created April 12, 2020 23:49 — forked from NigelEarle/Knex-Migrations-Seeding.md
Migration and seeding instructions using Knex.js!

Migrations & Seeding

What are migrations??

Migrations are a way to make database changes or updates, like creating or dropping tables, as well as updating a table with new columns with constraints via generated scripts. We can build these scripts via the command line using knex command line tool.

To learn more about migrations, check out this article on the different types of database migrations!

Creating/Dropping Tables

@annymosse
annymosse / updateCountry_fetch.js
Created March 29, 2020 02:26 — forked from yusinto/updateCountry_fetch.js
Graphql mutation with fetch
const updateCountryFetch = async (countryId, happinessFactor, population) => {
const query = JSON.stringify({
query: `mutation {
updateCountry(
id: "${countryId}"
happinessFactor: ${happinessFactor}
population: ${population}) { id }
}
`
});
@annymosse
annymosse / v-cloak.md
Last active March 13, 2020 17:24 — forked from adamwathan/v-cloak.md
Useful CSS utilities for Vue.js cloaking

Handy helpers for controlling visibility of elements until Vue has compiled.

Use like:

<div v-cloak>
  <h1>
    <span class="v-cloak--inline">Loading...</span> <!-- Only displayed before compiling -->
    <span class="v-cloak--hidden">{{ post.title }}</span> <!-- Hidden until compiling is finished -->
 
@annymosse
annymosse / main.go
Created October 22, 2019 19:37 — forked from Pagliacii/main.go
Golang version of the base62 algorithm. Details: https://gist.github.com/bhelx/778542
package main
import (
"fmt"
"log"
"math"
"os"
"regexp"
"strconv"