Skip to content

Instantly share code, notes, and snippets.

View Augustpi's full-sized avatar
🖖
Hi there

Avni Onur Pehlivan Augustpi

🖖
Hi there
View GitHub Profile
@Augustpi
Augustpi / forcrowd_backbone_basic_view_api_class.dart
Last active November 16, 2018 19:55
forCrowd Backbone - Api Basic view - dartlang classes
/// forCrowd Backbone Api Basic view - dartlang
///
/// https://github.com/forCrowd/Backbone
/// https://api.backbone.forcrowd.org/odata/v1/Project(1235)
///
/// BasicView
///
class BasicView {
String odataMetadata;
@Augustpi
Augustpi / workbench.colorCustomizations.json
Created August 27, 2020 10:22 — forked from jacklorusso/workbench.colorCustomizations.json
A list of all Visual Studio Code customizable colors, grouped by UI region. Copy and paste into User Settings (comments are allowed) to tweak an existing theme or work on your own.
"workbench.colorCustomizations": {
// Contrast Colors - The contrast colors are typically only set for high contrast themes. If set, they add an additional border around items across the UI to increase the contrast.
"contrastActiveBorder": "",
"contrastBorder": "",
// Base Colors
"focusBorder": "",
"foreground": "",
"widget.shadow": "",
"selection.background": "",
"descriptionForeground": "",
@Augustpi
Augustpi / vscode-internal-command
Created October 24, 2020 14:10
vscode internal command
_executeDocumentSymbolProvider
_executeLinkProvider
history.showPrevious
history.showNext
setContext
_moveTo
_moveToSelect
columnSelect
cursorColumnSelectLeft
cursorColumnSelectRight
@Augustpi
Augustpi / regex.md
Created October 26, 2020 06:59 — forked from vitorbritto/regex.md
Regex Cheat Sheet

Regular Expressions

Basic Syntax

  • /.../: Start and end regex delimiters
  • |: Alternation
  • (): Grouping
@Augustpi
Augustpi / .storybook
Created January 3, 2021 12:07 — forked from ademilter/.storybook
postcss config for storybook
- webpack.config.js
- postcss.config.js
- config.js
- addons.js
@Augustpi
Augustpi / example-1.js
Created March 26, 2021 18:07
medium - proxy
let target = {};
let proxy = new Proxy(target, {}); // boş bir handler objesi ile!
proxy.test = 5;
console.log(target); // {test: 5}
console.log(proxy); // Proxy {test: 5}
for (let key in proxy) console.log(key);
// test
@Augustpi
Augustpi / proxy-example-2.js
Created March 26, 2021 18:11
medium - javascript proxy kullanımı örnek 2
function onChangeFunction() {
console.log('onChangeFunction');
}
var handler = {
getOwnPropertyDescriptor(target, prop) {
console.log("getOwnPropertyDescriptor");
return Object.getOwnPropertyDescriptor(target, prop);
},
@Augustpi
Augustpi / proxy-check-property-example-3.js
Created March 26, 2021 18:15
Medium - Javascript Proxy kullanımı örnek 3
let handler = {
get: function (target, name) {
return name in target
? target[name]
: 'key, obje içinde bulunmuyor';
},
};
let obj = {
code: "code",
@Augustpi
Augustpi / proxy-validation-example-4.js
Created March 26, 2021 18:17
Medium - JavaScript Proxy kullanımı Örnek 4
let validator = {
set: function(obj, prop, value) {
if (prop === 'age') {
if(!Number.isInteger(value)) {
throw new Error('Yaş için rakam girmelisiniz')
}
if (value > 110) {
throw new RangeError('Bu değer beklenenden yüksek')
}
}
@Augustpi
Augustpi / functions-singleton-example-1.js
Last active March 27, 2021 16:40
Medium - functions
export let store = (function () {
let instance;
function init() {
// Private methods and variables
let _counter = 0;
// Private methods
function _getCounter() {