Skip to content

Instantly share code, notes, and snippets.

View rivman's full-sized avatar
🏠
Working from home

RivDesign rivman

🏠
Working from home
View GitHub Profile
@rivman
rivman / multithreading.py
Created January 5, 2020 21:22 — forked from alyssaq/multithreading.py
python multithreading
#!/usr/bin/env python
# -*- coding: utf-8 -*-
""" Sample multithreading with bottle.py
Requirements: requests, bottle
To run:
$ python app.py
To post data, open another command shell and type:
@rivman
rivman / import-ftp-proxy.php
Created November 28, 2019 20:09 — forked from trey8611/import-ftp-proxy.php
This script reads the specified file over FTP and outputs it over HTTP. Thus, you can point WP ALL Import at the URL for this script on your server to provide a "bridge" between FTP and HTTP. This is provided with the hope it will be useful but custom PHP and importing over FTP is not officially supported.
<?php
// Note: Anyone could access your data if they guess this URL. You should remove this file from the server
// after importing or name it to something "unguessable". For even better security use an .htaccess rule.
//
// If you're experiencing problems you can uncomment the following line so errors will be sent to the file.
// ini_set('display_errors', 1); ini_set('display_startup_errors', 1); error_reporting(E_ALL);
//
// Enter the FTP (or HTTP) URL of your data file below.
$url = "ftp://username:password@hostname.com/full/path/to/file.csv";
@rivman
rivman / media-query.css
Created November 22, 2019 22:53 — forked from gokulkrishh/media-query.css
CSS Media Queries for Desktop, Tablet, Mobile.
/*
##Device = Desktops
##Screen = 1281px to higher resolution desktops
*/
@media (min-width: 1281px) {
//CSS
@rivman
rivman / wp-config.php
Created November 15, 2019 15:46 — forked from MikeNGarrett/wp-config.php
All those damned wp-config constants you can never remember.
<?php
// PHP memory limit for this site
define( 'WP_MEMORY_LIMIT', '128M' );
define( 'WP_MAX_MEMORY_LIMIT', '256M' ); // Increase admin-side memory limit.
// Database
define( 'WP_ALLOW_REPAIR', true ); // Allow WordPress to automatically repair your database.
define( 'DO_NOT_UPGRADE_GLOBAL_TABLES', true ); // Don't make database upgrades on global tables (like users)
// Explicitely setting url
<?php
/*
################### READ ME #################################
You'll pass the URL to your feed/file to this function inside the "Download from URL" option when creating an import.
Image examples: https://d.pr/hCfNek and https://d.pr/MnerNb.
1. [custom_file_download("ftp://username:password@hostname.com/full/path/to/file.csv", "csv")]
2. [custom_file_download("http://example.com/full/path/to/file.csv", "csv")]
@rivman
rivman / cookie-microblock
Created July 7, 2019 16:42
Cookie notice MicroBlock Origin
@rivman
rivman / gare.html
Created May 20, 2019 09:38 — forked from diyfr/gare.html
Rechercher les premiers trains au départ d'une gare en utilisant le code UIC avec les Apis SNCF https://www.digital.sncf.com/startup/api
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="cache-control" content="max-age=0" />
<meta http-equiv="cache-control" content="no-cache" />
<meta http-equiv="expires" content="0" />
<meta http-equiv="expires" content="Tue, 01 Jan 1980 1:00:00 GMT" />
<meta http-equiv="pragma" content="no-cache" />
@rivman
rivman / Windown Telementry ans s**t IP, a bloquer dans router ou hosts
Created May 19, 2019 09:19
Windown Telementry ans s**t IP, a bloquer dans router ou hosts
13.68.31.193
13.66.56.243
13.68.82.8
13.76.218.117
13.76.219.191
13.76.219.210
13.78.130.220
13.78.232.226
13.78.233.133
13.92.194.212
@rivman
rivman / Gmail-Archive.js
Created May 2, 2019 16:32 — forked from labnol/Gmail-Archive.js
Archiver for Gmail
/*
*
* Copyright 2012 - Luca Giacomel (lgiacomel [at] google [dot] com)
* Use this at your own risk!
* Remember that Google has nothing to do with this
* Distributed under GPLv3
*
*/
function doGet(e) {
@rivman
rivman / file-upload-forms
Created May 2, 2019 16:19 — forked from labnol/file-upload-forms
File Upload Forms for Google Drive
File Upload Forms for Google Drive
----------------------------------
With the File Upload forms, you can upload files of any size and the files are sent directly to the owner’s Google Drive while the form data is saved in a Google Spreadsheet.
A [Pen](https://codepen.io/labnol/pen/QYWvwV) by [Amit Agarwal](https://codepen.io/labnol) on [CodePen](https://codepen.io).
[License](https://codepen.io/labnol/pen/QYWvwV/license).