Skip to content

Instantly share code, notes, and snippets.

@Prid13
Prid13 / cURL post.php
Created July 3, 2018 00:37
cURL POST Request
<?php
// eksempel kode på INSERT til Candidate (legge til ny candidate)
$url = "https://api.recman.no/v2/post/candidate";
// lager en array med alle variablene vi sender med. Har kopiert fra eksempel til Insert på recman
$data = array(
{
"key": "YOUR_KEY",
@Prid13
Prid13 / phpBB automated login script.php
Created July 6, 2018 00:43
Automated login script for phpBB
<?php
define('IN_PHPBB', true);
$phpbb_root_path = './';
$phpEx = substr(strrchr(__FILE__, '.'), 1);
include($phpbb_root_path . 'common.' . $phpEx);
// Start session management
$user->session_begin();
$auth->acl($user->data);
<?php $args = array('post_type' => 'proyecto', 'tag' => 'actual'); ?>
<?php $loop = new WP_Query($args); ?>
<?php if ( $loop->have_posts() ) : while ( $loop->have_posts() ) : $loop->the_post(); $postid=the_ID();?>
<div class="modal fade" id="myModal-<? the_ID(); ?>" tabindex="-1" role="dialog" aria-hidden="true">
<div class="modal-dialog" role="document">
<div class="modal-content">
<?php
echo get_post_meta($postid, 'proyecto', true);
?>
@Prid13
Prid13 / StackExchange Revert Formatting (mobile).md
Last active September 24, 2020 20:23
Revert StackExchange sites to Old Line Height (for Mobile Bookmarklets)
@charset "UTF-8";
@import url(fonts.css);
@import url(normalize.css);
html
{
color: #33392D;
font-family: "Exo2", sans-serif;
font-size: 16px;
}
@charset "UTF-8";
@import url(fonts.css);
@import url(normalize.css);
#header {
width: auto;
position: relative;
color: #fff3c9;
background-color: #0071b3;
z-index: 2;