Skip to content

Instantly share code, notes, and snippets.

View barinali's full-sized avatar
🏠
Working remotely

Ali BARIN barinali

🏠
Working remotely
View GitHub Profile
@dmitshur
dmitshur / gist:77cc54e53bbc0bf9a9a6
Last active February 19, 2020 10:01
How I use GOPATH with multiple workspaces.
@vpodk
vpodk / numbers.js
Last active April 20, 2020 21:20
Manipulating numbers in JavaScript.
var n = 1;
console.log(n.toFixed(2));
// To change the number directly:
// 1. Use parentheses:
console.log((1).toFixed(2));
// 2. Use two dots:
console.log(1..toFixed(2));
// Number binary representation:
console.log(20..toString(2));
@dwayne
dwayne / a-modern-frontend-dev.md
Last active March 21, 2021 11:38
Articles, tutorials and tools for modern front-end development.

Problem: What does a Modern Front-End Development Workflow Look Like?

I want to start writing libraries and large applications using the JavaScript language. However, I don't know how to setup the project and which build tools to use. What I do know is that the JavaScript community has moved way beyond using browser developer tool plugins and strategically-placed console.log() statements to debug, test, and build code.

I need help.

Below, I will keep track of articles, tutorials and tools I come across as I search for a way to bring my front-end development chops up-to-date.

The Ultimate Resource

@gregrickaby
gregrickaby / html5-schema.org-markup.html
Last active August 2, 2022 00:05
Proper SCHEMA.ORG markup
<!DOCTYPE html>
<html lang="en-US">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<meta name="robots" content="noodp, noydir" />
<link rel="dns-prefetch" href="//cdnjs.cloudflare.com">
<link rel="canonical" href="http://mysite.com/" />
<link rel="stylesheet" href="http://mysite.com/style.css" type="text/css" />
@azer
azer / gist:38dbf5c259a1fb6aa018b4f8668d04d7
Created August 7, 2019 12:39
Unwatch all repositories of an organization
(function () {
const org = 'ORG'
const nodes = document.querySelectorAll('.Box-row');
const rows = [ ...nodes ];
const orgRows = rows.filter((e) => e.innerText.startsWith(` ${org}/`));
const orgUnsubButtons = orgRows.map(row => row.querySelector('button.select-menu-item[value="included'));
orgUnsubButtons.forEach(button => console.log(button.click()));
@javierarques
javierarques / protractorAPICheatsheet.md
Last active January 31, 2023 08:51
Protractor API Cheatsheet
@dtolb
dtolb / jssip.md
Last active December 15, 2023 10:46
JsSip Demo

JSSIP with Catapult API

⚠️ This has been updated at JsFiddle*

Prerequisites

  • Register for a Catapult (Bandwidth Application Platform) account here
  • Register a SIP domain
  • Create an endpoint/user
  • If you want to make calls to the PSTN (normal phones) you will need a server to handler events from Catapult
@leabdalla
leabdalla / Laravel Sentry 2 with multiple user types.md
Last active February 10, 2024 10:57
Laravel Sentry 2 with multiple user types, finally.

Sentry is an amazing auth system. But I really need a feature: multiple user types in the same app. And I cannot separate those in groups, because they have different table columns. After 2 days burning my head, I think I found a good solution. The magic is duplicate SentryServiceProvider with new different settings.

This was tested on Laravel 4.0 and Sentry 2. If you're using other version of Sentry, my suggestion is to follow same steps from this gist but use your local files instead copying files from here.

Lets suppose we have a fresh Sentry install with default User ambient. Now we want another ambient called Admin, with new model and different settings. How to do:

1. One model, one ambient

@demisx
demisx / angularjs-providers-explained.md
Last active March 17, 2024 11:09
AngularJS Providers: Constant/Value/Service/Factory/Decorator/Provider
Provider Singleton Instantiable Configurable
Constant Yes No No
Value Yes No No
Service Yes No No
Factory Yes Yes No
Decorator Yes No? No
Provider Yes Yes Yes

Constant