Skip to content

Instantly share code, notes, and snippets.

View jsanta's full-sized avatar

Jose Ignacio Santa Cruz G. jsanta

View GitHub Profile
@mrharel
mrharel / proxyTrack.js
Created December 28, 2018 14:24
Using Proxy to Track Javascript Class
const callerMap = {};
function getCaller(error) {
if (error && error.stack) {
const lines = error.stack.split('\n');
if (lines.length > 2) {
let match = lines[2].match(/at ([a-zA-Z\-_$.]+) (.*)/);
if (match) {
return {
name: match[1].replace(/^Proxy\./, ''),
@shaneparsons
shaneparsons / ionic-publish.md
Last active February 16, 2024 10:13
Preparing for Release / Publishing an Ionic App

Preparing for Release / Publishing an Ionic App

Customizing Cordova's config.xml file

Go to your project root and open config.xml file in your text editor.

The first thing to change is your app's human readable name. Replace the name inside <name> </name>.

Second, change the id value inside

@JahsonKim
JahsonKim / enableOleAutomation.sql
Last active May 17, 2023 12:56
How to send http POST request from sql server stored procedure. Important! For some reason sp_OAGetProperty is returning null. Am not sure why and if anyone has an idea can update the gists. In case you need to try another option SQL CLR would help. Check here https://gist.github.com/JahsonKim/05e6af7744f2d7ef814e5ed331419db5
--This query enables ole automation procedures. set 0 to disable
exec master.dbo.sp_configure 'Ole Automation Procedures', 1
RECONFIGURE
--OLE utomation disabled the following error is thrown.
--SQL Server blocked access to procedure 'sys.sp_OACreate' of component
--'Ole Automation Procedures' because this component is turned off as part
--of the security configuration for this server.
--A system administrator can enable the use of 'Ole Automation Procedures'
@bszwej
bszwej / echo.js
Last active April 26, 2024 05:22
Pure Node.js echo server, that logs all incoming http requests (method, path, headers, body).
const http = require('http');
const server = http.createServer();
server.on('request', (request, response) => {
let body = [];
request.on('data', (chunk) => {
body.push(chunk);
}).on('end', () => {
body = Buffer.concat(body).toString();
@jcubic
jcubic / ReflectService.java
Last active August 9, 2017 20:55
ReflectService plugin
package com.example.package;
import android.content.Context;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.StringWriter;
import java.io.PrintWriter;
@bobvanderlinden
bobvanderlinden / example.html
Last active October 28, 2022 20:41
Simple QR-Code scanner based on jsqrcode
<html>
<head>
<script src="https://webqr.com/llqrcode.js"></script>
<script src="jsqrcode-camera.js"></script>
</head>
<body>
<div id="qrcodescanner"></div>
<div id="message"></div>
</body>
<script>
@regilero
regilero / nginx.conf
Last active February 26, 2021 12:22 — forked from thoop/nginx.conf
Altered prerender.io nginx.conf for nginx
# Change YOUR_TOKEN to your prerender token and uncomment that line if you want to cache urls and view crawl stats
# Change example.com (server_name) to your website url
# Change /path/to/your/root to the correct value
# Generate $prerender_ua bool value based on user agent
# indexation bots will get this as 1,
# prerender user agent will always get 0 (avoid loops)
map $http_user_agent $prerender_ua {
default 0;
@jatcwang
jatcwang / gist:ae3b7019f219b8cdc6798329108c9aee
Created February 2, 2017 23:44
List of all setxkbmap configuration options (including models/layout/etc)
! model
pc101 Generic 101-key PC
pc102 Generic 102-key (Intl) PC
pc104 Generic 104-key PC
pc105 Generic 105-key (Intl) PC
dell101 Dell 101-key PC
latitude Dell Latitude series laptop
dellm65 Dell Precision M65
everex Everex STEPnote
flexpro Keytronic FlexPro
@MeLlamoPablo
MeLlamoPablo / nvmlink
Created February 1, 2017 11:34
Creates a symlink to /usr/bin/node after using nvm
@sangress
sangress / replace.pipe.ts
Created December 27, 2016 16:22
Angular2 replace pipe
import { Pipe, PipeTransform } from '@angular/core';
@Pipe({
name: 'replace'
})
export class ReplacePipe implements PipeTransform {
transform(value: string, expr: any, arg2: string): any {
if (!value)
return value;