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
import os | |
import shutil | |
import re | |
def changeFileName(files): | |
for file in files: | |
name = file.split("-") | |
extension = name[2].split(".")[1] | |
newFileName = ".".join([name[1],extension]) | |
os.renames(file, newFileName) |
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
var jquery = document.createElement('script'); | |
jquery.src = "https://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"; | |
document.getElementsByTagName('head')[0].appendChild(jquery); | |
document.addEventListener("DOMContentLoaded", function(event) { | |
sheet = "title^is_active^phone^country_id^region^street^city^postal_code^desc^latitude^longitude^stores^website^icon^image^position\n"; | |
$('.magasin').each(function(){ | |
/*Dealer Name*/ | |
$(this).children('.nom_mag').children('font').remove(); | |
title = $(this).children('.nom_mag').text(); |
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
<svg preserveAspectRatio="xMinYMin" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" | |
viewBox="0 0 560 1388"> | |
<defs> | |
<mask id="canTopMask"> | |
<image width="560" height="1388" xlink:href="img/can-top-alpha.png"></image> | |
</mask> | |
</defs> | |
<image mask="url(#canTopMask)" id="canTop" width="560" height="1388" xlink:href="can-top.jpg"></image> | |
</svg> |
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
#!upstart | |
description "odoo-server" | |
start on runlevel [2345] | |
stop on runlevel [!2345] | |
#Respawn, with a limit of 10 times in a timespan of 90 seconds, after which it stops respawning. | |
respawn | |
respawn limit 10 90 |
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
## -*- coding: utf-8 -*- | |
%for inv in objects : | |
<%def carriage_returns(text): | |
return text.replace('\n', '<br />') | |
%> | |
<% setLang(inv.partner_id.lang) %> | |
<html> | |
<head> | |
<style type="text/css"> | |
${css} |
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
#!/bin/bash | |
ip1=""; | |
ip2=""; | |
changed=0; | |
date1=$( date "+%s" ) | |
while true; do | |
ip1=$(curl -s ifconfig.me/ip); | |
if [[ "$ip1" != "$ip2" ]]; then | |
changed=$(( changed + 1 )); | |
date2=$( date "+%s" ) |
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 | |
$callbackUrl = 'http://'.$_SERVER['HTTP_HOST'].$_SERVER['PHP_SELF']; // This scripts url | |
$magentoUrl = 'http://example.com/'; // The url of your magento installation | |
$temporaryCredentialsRequestUrl = $magentoUrl . 'oauth/initiate?oauth_callback=' . urlencode($callbackUrl); | |
$adminAuthorizationUrl = $magentoUrl . 'admin/oauth_authorize'; | |
$accessTokenRequestUrl = $magentoUrl . 'oauth/token'; | |
$apiUrl = $magentoUrl . 'api/rest'; | |
$consumerKey = 'OAUTH CONSUMER KEY'; // Get from System > Web Services > REST - OAUTH Consumers > Edit Consumer > Key | |
$consumerSecret = 'OAUTH CONSUMER SECRET'; // Get from System > Web Services > REST - OAUTH Consumers > Edit Consumer > Secret |
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
#!/bin/sh | |
smtpsrv="smtp.gmail.com" | |
smtpport="587" | |
smtpusr="" | |
smtppwd="" | |
username64=$( echo $smtpusr | base64 ) # $( base64_encode $smtpusr ) | |
password64=$( echo $smtppwd | base64 ) # $( base64_encode $smtppwd ) | |
( | |
echo "EHLO localhost"; sleep 3; |
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
#!/bin/sh | |
# More info on wpa_supplicant configuration: | |
# https://w1.fi/cgit/hostap/plain/wpa_supplicant/wpa_supplicant.conf | |
# INSIDE PFSENSE DO NOT "ENABLE WPA" ON THE INTERFACE YOU ARE TRYING TO USE BELOW | |
interface="" # Your wifi interface eg "ath0_wlan0" (DO NOT "ENABLE WPA") | |
ssid="" # SSID of the AP you're connecting to | |
identity="" # Your 802.1X Enterprise username |
OlderNewer