Skip to content

Instantly share code, notes, and snippets.

View Yonet's full-sized avatar
🎯
Focusing

Yönet Yonet

🎯
Focusing
View GitHub Profile
@mattetti
mattetti / audioGenButton.cs
Created October 5, 2021 18:24
Unity script to generate and load an audio clip using Azure Cognitive Services
using System.Collections;
using UnityEngine;
using UnityEngine.UI;
using Microsoft.CognitiveServices.Speech;
using Microsoft.CognitiveServices.Speech.Audio;
using System.IO;
using UnityEngine.Networking;
using System.Threading.Tasks;
@johnpapa
johnpapa / repo-sync.bash
Last active May 14, 2021 22:27
Repo Sync: Refresh/merge your local and origin with the upstream.
function repo-sync {
# ######################################
# link: https://jpapa.me/reposync
#
# What this does:
# [𝟙] Get the latest for your origin and upstream main branches'
# [𝟚] Make sure your main origin is in sync with your upstream and your local is pushed
# [𝟛] Checkout your branch and pull the latest'
# [𝟜] Merge main with your branch. This will sync your branch all changes in the upstream
<!DOCTYPE qgis_style>
<qgis_style version="2">
<symbols>
<symbol clip_to_extent="1" name="qlimt" force_rhr="0" type="fill" alpha="1">
<layer enabled="1" pass="0" locked="0" class="GeometryGenerator">
<prop v="Fill" k="SymbolType"/>
<prop v="with_variable('my_geom',&#xd;&#xa;CASE WHEN &#xd;&#xa; num_geometries( $geometry)>1&#xd;&#xa; THEN &#xd;&#xa; geometry_n( $geometry, @geometry_part_num)&#xd;&#xa; ELSE&#xd;&#xa; $geometry&#xd;&#xa; END,&#xd;&#xa; with_variable('shape',rand(1,4),&#xd;&#xa; CASE WHEN &#xd;&#xa; @shape =1&#xd;&#xa; THEN &#xd;&#xa; minimal_circle( @my_geom )&#xd;&#xa; WHEN&#xd;&#xa; @shape =2&#xd;&#xa; THEN&#xd;&#xa; oriented_bbox( @my_geom )&#xd;&#xa; WHEN&#xd;&#xa; @shape =3&#xd;&#xa; THEN&#xd;&#xa; oriented_bbox( @my_geom )&#xd;&#xa; WHEN&#xd;&#xa; @shape =4&#xd;&#xa; THEN&#xd;&#xa; simplify(@my_geom, rand(1,20))&#xd;&#xa; END))&#xd;&#xa; " k="geometryModifier"/>
<data_defined_properties>
<Option type="Map">
@ThomasBurleson
ThomasBurleson / Guide-to-Custom-Nx-Schematic.md
Last active June 15, 2023 13:32
Custom Nx workspace schematic to build a custom 'state' library.

Scenario

We want to build a custom schematic for company Aero that will internally do two things:

  • build a new ngrx library using Nx workspace naming conventions
  • generate ngrx state-management files; include the *.facade.* files

Important: This example is valid ONLY for Nx v6.2.x or higher!

@scottcate
scottcate / Bookmarklet for CDA Web Trends
Last active March 28, 2022 01:24
Bookmarklet Template for adding Web Trends tracking

Tree-shakeable Tokens Docs

Status quo and issues with it

Injector structure

Currently, to provide services in Angular, you include them in an @NgModule:

@Injectable()
@ThomasBurleson
ThomasBurleson / ngInterview.md
Last active February 2, 2021 17:40
Angular Interview Questions

The interview questions below are grouped by category and each category lists questions in easy-to-hard order.

Interviews should ask the candidate to self-assess their skills/experience. Based on the candidate's response, the interviewer can jump to the appropriate section.

Some basic questions going from easy to difficult. A more exhaustive list of more questions from the community can be found here.

JavaScript

  • What is variable shadowing
@jonlabelle
jonlabelle / npm_vs_yarn_command_translation_cheatsheet.md
Last active April 11, 2024 15:26
npm vs yarn command translation cheat sheet

Aligning images

This is a guide for aligning images.

See the full Advanced Markdown doc for more tips and tricks

left alignment

@auser
auser / impure-pipes.js
Created May 6, 2016 16:07
Pipes in Angular from @AysegulYonet at #ngConf
PurePipe -- A _stateless_ pipe -- @Pipe({ name: 'filter', pure: false }) -- revert to watch for _any_ change
// Impure pipes
@component({
selector: 'activities',
template: `<span>Last modified</span><p>{{ activities | async }}</p>`
})
class ActivitiesComponent {
activities: Observable<array>;
}