subr | words |
---|---|
pics | hell,minutes,hospital,build,backyard |
funny | soon,wanted,dads,photos,sums |
videos | better,change,plane,simple,curiosity |
politics | subject,democrat,democracy,basis,google |
technology | streaming,snowden,fast,edward,sued |
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 requests | |
from bs4 import BeautifulSoup | |
def get_horoscope(zodiac_sign: int, day: str): | |
if not "-" in day: | |
res = requests.get( | |
f"https://www.horoscope.com/us/horoscopes/general/horoscope-general-daily-{day}.aspx?sign={zodiac_sign}") | |
else: | |
day = day.replace("-", "") |
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
// Source: https://dev.to/lucis/how-to-push-files-programatically-to-a-repository-using-octokit-with-typescript-1nj0 | |
const { Octokit } = require('@octokit/rest') | |
const glob = require('globby') | |
const path = require('path') | |
const { readFile } = require('fs-extra') | |
// org or owner | |
const ORGANIZATION = process.env.ORGANIZATION |
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 SIGN_NAMES = [ | |
{ | |
sign: 'Aquarius', | |
start: { | |
day: 20, | |
month: 1, | |
}, | |
end: { | |
day: 18, | |
month: 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
/* | |
* One of the questions that recently came up is how to remove vowels from Hebrew characters in Unicode | |
* (or any other similar language). A quick look at Hebrew Unicode chart shows that the vowels are all | |
* located between 0x0591 (1425) and 0x05C7 (1479). With this and Javascript's charCodeAt function, it | |
* is trivial to strip them out with Javascript as follows | |
* | |
* Live demo is available here: | |
* https://jsfiddle.net/js0ge7gn/ | |
*/ |
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
jQuery(document).ready(function($){ | |
var ajaxurl = object.ajaxurl; | |
var data = { | |
action: 'my_action', // wp_ajax_my_action / wp_ajax_nopriv_my_action in ajax.php. Can be named anything. | |
foobar: 'some value', // translates into $_POST['foobar'] in PHP | |
}; | |
$.post(ajaxurl, data, function(response) { | |
alert("Server returned this:" + response); | |
}); | |
}); |
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
find . -name "*.ht*" | while read i; do pandoc -f html -t markdown "$i" -o "${i%.*}.md"; done |
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 mongoose = require('./../../mongoose'); | |
mongoose.connect('localhost', 'testing_tojsonWithVirtuals'); | |
var schema = new mongoose.Schema({ | |
name: { | |
first: String | |
, last: String | |
} | |
, age: Number |
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 express = require('express') | |
, cookieSessions = require('./cookie-sessions'); | |
var app = express(); | |
app.use(express.cookieParser('manny is cool')); | |
app.use(cookieSessions('sid')); | |
app.get('/', function(req, res){ | |
req.session.count = req.session.count || 0; |
NewerOlder