Skip to content

Instantly share code, notes, and snippets.

@mksglu
mksglu / sozcu.disable-popup.js
Created May 31, 2020 10:49
Sözcü'de bazen okumak istediğim bir haber olduğunda ısrarla karşıma çıkan popup'un ağzını yüzünü kıran bir kod parçası.
var p=Array.prototype.slice.call(document.querySelectorAll(".fc-ab-root"));p.forEach(function(o){o.parentNode.removeChild(o)}),document.body.style.overflow="auto";
@cagataycali
cagataycali / babelInterpreter.sh
Created July 8, 2016 16:28
Start pm2 process with babel-node interpreter
pm2 start app.js --interpreter ./node_modules/.bin/babel-node
@co3moz
co3moz / starter.frag
Last active March 28, 2018 06:23
just glsl starter boilerplate :)
precision mediump float;
uniform float time;
uniform vec2 mouse;
uniform vec2 resolution;
void main() {
vec2 aspect = resolution.xy / min(resolution.x, resolution.y);
vec2 position = (gl_FragCoord.xy / resolution.xy) * aspect;
vec4 color = vec4(0.0);
@soheilhy
soheilhy / nginxproxy.md
Last active May 16, 2024 08:59
How to proxy web apps using nginx?

Virtual Hosts on nginx (CSC309)

When hosting our web applications, we often have one public IP address (i.e., an IP address visible to the outside world) using which we want to host multiple web apps. For example, one may wants to host three different web apps respectively for example1.com, example2.com, and example1.com/images on the same machine using a single IP address.

How can we do that? Well, the good news is Internet browsers

@xeoncross
xeoncross / ajax.js
Last active August 3, 2023 06:06
Simple, cross-browser Javascript POST/GET xhr request object. Supports request data and proper AJAX headers.
/**
* IE 5.5+, Firefox, Opera, Chrome, Safari XHR object
*
* @param string url
* @param object callback
* @param mixed data
* @param null x
*/
function ajax(url, callback, data, x) {
try {
@muratcorlu
muratcorlu / slugify_tr.js
Created September 11, 2012 12:46
Javascript Türkçe karakter destekli slugify (url metni oluşturucu)
/**
* Metni url'de kullanılabilir hale çevirir. Boşluklar tireye çevrilir,
* alfanumerik olmayan katakterler silinir.
*
* Transform text into a URL path slug(with Turkish support).
* Spaces turned into dashes, remove non alnum
*
* @param string text
*/
slugify = function(text) {