// jQuery
$(document).ready(function() {
// code
})
This file contains hidden or 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
(ns webstore.simplecart_parser | |
(:require [clojure.string :as string])) | |
;; see github.com/sventech/simplecart-js for tax calculation improvement fork | |
(def input-params | |
{"item_quantity_1" "1", | |
"itemCount" "2", | |
"item_price_1" "9.99", | |
"store_name" "Online Store", | |
"item_name_1" "Awesome Product - MP3", |
This file contains hidden or 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 | |
$api_token = 'slack-api-token'; | |
if ( file_exists( 'users.json' ) ) { | |
$api_users = file_get_contents( 'users.json' ); | |
} else { | |
$api_users = file_get_contents( 'https://slack.com/api/users.list?token=' . $api_token ); | |
if ( false === $api_users ) { |
This file contains hidden or 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 | |
# | |
# chmodr.sh | |
# | |
# author: Francis Byrne | |
# date: 2011/02/12 | |
# | |
# Generic Script for recursively setting permissions for directories and files | |
# to defined or default permissions using chmod. | |
# |
This file contains hidden or 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
(ns fileupload.core | |
(:use [net.cgrand.enlive-html | |
:only [deftemplate defsnippet content clone-for | |
nth-of-type first-child do-> set-attr sniptest at emit*]] | |
[compojure.core] | |
[ring.adapter.jetty]) | |
(:require (compojure [route :as route]) | |
(ring.util [response :as response]) | |
(ring.middleware [multipart-params :as mp]) | |
(clojure.contrib [duck-streams :as ds])) |
- Install ffmpeg using homebrew:
brew install ffmpeg
- convert the file:
This file contains hidden or 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
tar xzOf dump.sql.tar.gz | mysql -u $user -p $database |
This file contains hidden or 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
(ns my.server | |
(:use org.httpkit.server | |
[clojure.string :only [split trim lower-case]]) | |
(:import [org.httpkit.server AsyncChannel])) | |
(defn origin-match? [origin-re req] | |
(if-let [req-origin (get-in req [:headers "origin"])] | |
(re-matches origin-re req-origin))) |
#Creating Certificates Reference
- From a terminal:
openssl req -new -newkey rsa:2048 -nodes -keyout yourdomain.key -out yourdomain.csr
- Enter the requested information:
- Common Name: The fully-qualified domain name, or URL, you're securing.
If you are requesting a Wildcard certificate, add an asterisk (
*
) to the left of the common name where you want the wildcard, for example*.coolexample.com
. - Organization: The legally-registered name for your business. If you are enrolling as an individual, enter the certificate requestor's name.
This file contains hidden or 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 re | |
import PyPDF2 | |
import spacy | |
class PdfParser(): | |
def __init__(self, file_path): | |
self.file_path = file_path | |
def pdf_reader(self) -> str: | |
content = '' | |
opener = open(self.file_path, 'rb') |
OlderNewer