This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// | |
// Desk.com Single Access Token API Example | |
// | |
// 1) Copy this file to the root of your webserver and change the $my_desk_url variable to point to your desk.com hostname | |
// 2) Go to https://[yoursite].desk.com/admin/settings/api-applications and create an API Application | |
// 3) Copy the consumer key & secret on the listing page after you create your API Application | |
// 4) Click the "Your Access Token" link to get your single access token & secret | |
// 5) Copy your single access token & secret and paste it into the appropriate variable in this file | |
// |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* VT100 terminal reset (<ESC>c) */ | |
console.log('\033c'); | |
/* numbers comparations */ | |
> '2' == 2 | |
true | |
> '2' === 2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
header('Content-Type: text/html; charset=ISO-8859-1'); | |
/** | |
* Class for convert letters from an input string | |
* Restrictions: | |
* - Work with latin alfhabet, except tilde letters. | |
* - No depend of setting of "Regional Configuration". | |
* Execution using: | |
* - From Console: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Class for extract chars paring | |
* Support: | |
* On PHP 5.x | |
* Execution using: | |
* - From Code Inside, instance from Class: | |
* $cp = new ClearPar(); | |
* echo $cp->build('(()()()()(()))))())((())'); | |
*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Class for complete the numbers from an input range | |
* Restrictions: | |
* - Letters are invalids, number only please. | |
* - If add negative numbers these are remove and | |
* the result init from a positive number like 1. | |
* - If add the zero number the result is empty string. | |
* Execution using: | |
* - From Code Inside, instance from Class: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
server { | |
listen 80; | |
listen [::]:80; #Use this to enable IPv6 | |
server_name www.example.com; | |
root /var/www/prestashop17; | |
access_log /var/log/nginx/access.log; | |
error_log /var/log/nginx/error.log; | |
index index.php index.html; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python | |
# -*- coding: utf-8 -*- | |
""" DMLogger """ | |
import tkinter as tk | |
import tkinter.scrolledtext as tkscrolledtext | |
import http.server as httpserver | |
import _thread as thread | |
import sqlite3 | |
import json | |
from urllib import parse |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python | |
# -*- coding: utf-8 -*- | |
""" | |
Webserver für Python | |
03.01.2014 MH Quelltext für Python 2.7 und 3.x | |
30.05.2013 MH Quelltext nach PEP8 überprüft | |
http://creativecommons.org/licenses/by-nc-sa/3.0/de/ | |
""" | |
try: | |
import Tkinter as tk |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const rp = require('request-promise'); | |
const rq = require('request'); | |
require('dotenv').config(); | |
let endpointFeed = `https://domain.com/feed/orders/status?limit=10`; | |
let endpointOrderSeller = `https://domain.com/orders/`; | |
let requestConfiguration = { | |
method: 'GET', | |
json: true, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let msurls = ["http://example.org", "http://example.org"] | |
let request = require ("request-promise-native") | |
async function doRequests () { | |
return await (Promise.all ( | |
msurls.map (async msurl => await request (msurl))) | |
) | |
} | |
/* */ |
OlderNewer