Skip to content

Instantly share code, notes, and snippets.

Avatar

Mustafa Kuscu mcku

  • istanbul, istanbul
View GitHub Profile
@mcku
mcku / foo.js
Created Sep 20, 2019
foo.js for dynamic import
View foo.js
export const bar = x => x;
@mcku
mcku / appRender.scala
Created Nov 28, 2018
main single-page app routed render
View appRender.scala
@dom def render: Binding[Element] = {
// init
implicit val pageState: PageState = AppState.page.bind
//some actions here
//actions.action1()
//actions.action2()
val routePage: Page = Router.route.state.bind
@mcku
mcku / translations-udash-t.scala
Created Nov 27, 2018
a sample t function for translation
View translations-udash-t.scala
import com.thoughtworks.binding.{Binding, FutureBinding, dom}
import io.udash.i18n.{Bundle, Lang, LocalTranslationProvider, Translated, TranslationKey, TranslationKey0, TranslationKey1, TranslationKey2, TranslationProvider}
import scala.concurrent.Future
import scala.util.{Failure, Success, Try}
import scala.scalajs.concurrent.JSExecutionContext.Implicits.queue
@mcku
mcku / dropdown-initialize.scala
Last active Nov 27, 2018
semantic-ui dropdown usage on binding.scala
View dropdown-initialize.scala
/*
Auto-initializing semantic-ui dropdown
using DOM MutationObserver
*/
object SemanticUI {
@js.native
trait SemanticJQuery extends JQuery {
def dropdown(params: js.Any*): SemanticJQuery = js.native
}
@mcku
mcku / test.log
Created Nov 13, 2018
scalajs-bundler test log
View test.log
$ pwd
/Users/mustafakuscu/Sync/scalajs-bundler-example/play
$ sbt -Dplugin.version=0.14.0 clean compile test
[info] Loading settings from idea.sbt ...
[info] Loading global plugins from /Users/mustafakuscu/.sbt/1.0/plugins
[info] Loading settings from plugins.sbt ...
[info] Loading project definition from /Users/mustafakuscu/Sync/scalajs-bundler-example/scalajs-bundler/sbt-web-scalajs-bundler/src/sbt-test/sbt-web-scalajs-bundler/play/project
[info] Loading settings from build.sbt ...
Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?
[info] Set current project to play (in build file:/Users/mustafakuscu/Sync/scalajs-bundler-example/scalajs-bundler/sbt-web-scalajs-bundler/src/sbt-test/sbt-web-scalajs-bundler/play/)
@mcku
mcku / PKGBUILD
Last active Jun 13, 2018
yaourt guvenlik sorunu
View PKGBUILD
pkgname=yaourt-script-security
pkgver=0.1
pkgrel=1
pkgdesc='yaourt acaba scriptlerimi calistiriyor mu'
arch=('any')
license=('BSD' 'GPL' 'LGPL' 'MIT')
url='http://www.google.com'
# burada tehlikeli bir komut da olabilirdi
echo acaba bu satiri da basacak mi
View gist:c5af200903795293f5a3ffa2730d9cad
$ lsmod
Module Size Used by
coretemp 16384 0
hwmon_vid 16384 0
nls_utf8 16384 1
udf 90112 1
crc_itu_t 16384 1 udf
fuse 94208 3
ctr 16384 6
ccm 20480 9
View gist:5c7da8fb15fe2ba455e5bf5849575f28
lspci -k
00:00.0 Host bridge: Intel Corporation Xeon E3-1200 v6/7th Gen Core Processor Host Bridge/DRAM Registers (rev 05)
Subsystem: ASUSTeK Computer Inc. Device 15e0
00:01.0 PCI bridge: Intel Corporation Xeon E3-1200 v5/E3-1500 v5/6th Gen Core Processor PCIe Controller (x16) (rev 05)
Kernel driver in use: pcieport
Kernel modules: shpchp
00:02.0 VGA compatible controller: Intel Corporation Device 591b (rev 04)
Subsystem: ASUSTeK Computer Inc. Device 15e0
Kernel driver in use: i915
Kernel modules: i915
View gist:67ad237d21326169f63df2330d6ecde4
$sudo sensors-detect --auto
# sensors-detect revision $Revision$
# System: ASUSTeK COMPUTER INC. GL553VD [1.0] (laptop)
# Kernel: 4.12.13-1-ARCH x86_64
# Processor: Intel(R) Core(TM) i7-7700HQ CPU @ 2.80GHz (6/158/9)
Running in automatic mode, default answers to all questions
are assumed.
Some south bridges, CPUs or memory controllers contain embedded sensors.
@mcku
mcku / react-onsenui.d.ts
Created Oct 17, 2016
a quick TS type definition for react-onsenui
View react-onsenui.d.ts
// Generated by typings
// Source: src/vendor/react-onsenui.d.ts
declare module "react-onsenui" {
export default Ons;
namespace Ons {
import React = __React;
// <Icon />
type Modifier = 'material'|'default';