Skip to content

Instantly share code, notes, and snippets.

View ayhansipahi's full-sized avatar
👾
Coding...

Ayhan Sipahi ayhansipahi

👾
Coding...
View GitHub Profile
@ulfie22
ulfie22 / lifecycle.js
Last active January 6, 2020 09:22
NativeScript Vue Lifecycle Package
const application = require("tns-core-modules/application");
export default function (Vue) {
Vue.cycle = {
init(vm) {
console.log('!@# starting init in lifecycle');
application.on(application.launchEvent, (args) => {
// ==UserScript==
// @name Hide Warnings in Request Log Window
// @namespace http://tampermonkey.net/
// @version 0.1
// @description try to take over the world!
// @author You
// @include */Sites-Site/-/ViewLogConsole-Start
// @grant none
// ==/UserScript==
@jdkanani
jdkanani / notepad.html
Last active June 16, 2024 13:44 — forked from jakeonrails/Ruby Notepad Bookmarklet
This bookmarklet gives you a code editor in your browser with a single click.
data:text/html, <style type="text/css">.e{position:absolute;top:0;right:0;bottom:0;left:0;}</style><div class="e" id="editor"></div><script src="http://d1n0x3qji82z53.cloudfront.net/src-min-noconflict/ace.js" type="text/javascript" charset="utf-8"></script><script>var e=ace.edit("editor");e.setTheme("ace/theme/monokai");e.getSession().setMode("ace/mode/ruby");</script>
<!--
For other language: Instead of `ace/mode/ruby`, Use
Markdown -> `ace/mode/markdown`
Python -> `ace/mode/python`
C/C++ -> `ace/mode/c_cpp`
Javscript -> `ace/mode/javascript`
Java -> `ace/mode/java`
Scala- -> `ace/mode/scala`
@thomaspark
thomaspark / subnav.css
Last active April 27, 2025 16:39
Subnav for Bootstrap 2
section {
padding-top: 60px;
}
.subnav {
margin-bottom: 60px;
width: 100%;
height: 36px;
background-color: #eeeeee; /* Old browsers */
background-repeat: repeat-x; /* Repeat the gradient */
@jlong
jlong / uri.js
Created April 20, 2012 13:29
URI Parsing with Javascript
var parser = document.createElement('a');
parser.href = "http://example.com:3000/pathname/?search=test#hash";
parser.protocol; // => "http:"
parser.hostname; // => "example.com"
parser.port; // => "3000"
parser.pathname; // => "/pathname/"
parser.search; // => "?search=test"
parser.hash; // => "#hash"
parser.host; // => "example.com:3000"