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
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the 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
(defmacro defcomponent [name attrs & body] | |
(let [i (.indexOf attrs '&)] | |
(if (> i -1) | |
(let [sym (get attrs (inc i))] | |
`(defn ~name ~attrs | |
~@(postwalk-replace {sym `(with-idx ~sym)} body))) | |
`(defn ~name ~attrs | |
~@body)))) |
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
(0 to 300).map(_ => scala.util.Random.nextPrintableChar).filter(Set('k', 'v', 's', 'e', 'y', 't', 'p', 'a', 'u', 'o').contains).grouped(5).map(_.mkString("")).mkString(" ") |
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 | |
/* | |
Convert Comments in a MySQL database (in this case from the Diem CMS) to a Wordpress WXR file that can be imported by Disqus | |
usage: $ php export-comments-for-disqus-xml.php > comments.xml | |
*/ | |
$connection = mysql_connect('localhost', 'username', 'password') or die(mysql_error()); | |
$db = mysql_SELECT_db('databasename', $connection); | |
db_query("set character_set_client='utf8'"); | |
db_query("set character_set_results='utf8'"); |
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
Verifying my Blockstack ID is secured with the address 14DtLwqnTLLvvPo96n8dXWnNbCDpHcuuSq https://explorer.blockstack.org/address/14DtLwqnTLLvvPo96n8dXWnNbCDpHcuuSq |
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
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQC4ByMpWJDpZnx3/Ym+NQXdnrQacMzAdiJ/4+OANSY29UPp3QLIu98EbAm7XGFQknuRSb1zrmngx+GGe7BLN+s6/Rkk/qsBBV1B2rP0X7CYENPIrv1+nrfHSH2tm4AzFh7NRH1f7PLVYTi0cxrNI731K4OjkOvba7LImwy5FV5ipxKOjxoUVvS6HPI2e9gecXkwCrdYms3FqUa6FiSE2TYM7paaHudTiE1ltAfPeI7dkd7yiHpl4nsuYC8/IHGfkphYDCsltmPqU9fc4oKQ1jb60K6UZHqLKzs78DzlfpWhEHrIciynmm6AqKXjlt6tBEKX+rmpFmQAic80icE71YrXVRUA3RQurnQmxpaArT1+ZFUKOy7NVzT7RXga2diRiPW+XLS+fCvhL5HxUTuhkIolP6tFUZFfk/1sUtTdiL0jYff467ssi97lTXRHSd0u18PhknNgF/jWmSQzhEy1v5mWngdftaVsZLjLpV3s8R13HySqn5WL8QIn5qNBNZZcUjRs6RAP7475cUMW9r3SZQtalFtQc/e3wSr7EATB5IGs9ksB7KLG3pbLNfaxvtp1ZeIOQULIjWkHxiSeJHGB66+ifnqSvhIpM+64ly5jG45UxrxOhnUixDpzFPAHZ4yacBORSocfMLCh1t9WKj6zcQezRiHkv9GZz9gagFBYK1r0eQ== debie.daan@gmail.com |
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 org.apache.hadoop.conf.Configuration; | |
import org.apache.hadoop.hbase.TableName; | |
import org.apache.hadoop.hbase.client.*; | |
import java.io.Serializable; | |
import java.util.HashMap; | |
import java.util.Map; | |
import java.util.concurrent.ExecutorService; | |
/** |
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 java.math.BigInteger; | |
public final class IbanTest { | |
public static final int IBANNUMBER_MIN_SIZE = 15; | |
public static final int IBANNUMBER_MAX_SIZE = 34; | |
public static final BigInteger IBANNUMBER_MAGIC_NUMBER = new BigInteger("97"); | |
public static boolean ibanTest(String accountNumber) { | |
String newAccountNumber = accountNumber.trim(); |
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
[tool.poetry] | |
name = "test-scipy" | |
version = "0.1.0" | |
description = "" | |
authors = ["Daan Debie <daan@...>"] | |
[tool.poetry.dependencies] | |
python = "^3.9" | |
[tool.poetry.dev-dependencies] |
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/env python | |
from typing import cast, Dict | |
import toml | |
import subprocess | |
def update_deps(name: str, version: str, t: Dict) -> Dict: | |
def update(deps: Dict) -> None: | |
for key in deps: | |
v = deps[key] |
OlderNewer