Skip to content

Instantly share code, notes, and snippets.

@jonaslsl
jonaslsl / wp-taxonomies-list.php
Last active August 29, 2015 14:13
Listin WP taxonomies
<?php
$args = array(
'orderby' => 'name',
'order' => 'ASC',
'taxonomy' => 'client_cat',
'hide_empty' => '0'
);
$categories = get_categories($args);
@jonaslsl
jonaslsl / types-plugin-loop.php
Created January 19, 2015 11:57
types plugin loop
<?php
$args = array( 'post_type' => 'clients' , 'posts_per_page' => '-1' );
$c = new WP_Query( $args );
if( $c->have_posts() ) {
while( $c->have_posts() ) {
$c->the_post();
$extraClasses = wp_get_post_terms($post->ID, 'client_cat', array("fields" => "slugs")); ?>
<?php foreach ($extraClasses as $key => $value) { echo $value . ' '; } ?>"
@jonaslsl
jonaslsl / isotope-nav-filter-js
Created January 19, 2015 11:59
isotope nav filter
<script type="text/javascript">
//loading isotope
var $container = $('.inside_view');
$(window).load(function(){
$container.isotope({
itemSelector : '.image',
layoutMode : 'fitRows'
});
});
@jonaslsl
jonaslsl / vertical-centering-js
Created January 19, 2015 12:01
vertical centering js
<script>
/* get the screen size and sets each section to its height */
$(window).on("load resize", function() {
var width = $(window).width();
var height = $(window).height();
var menu = $(".nav").height();
$('.h').css({ 'height' : ( ($(window).height() ) - menu ) }) ;}
});
@jonaslsl
jonaslsl / wp-url-change.php
Created January 19, 2015 12:02
wp url change
<?php
define('WP_HOME','http://localhost/');
define('WP_SITEURL','http://localhost/');
?>
@jonaslsl
jonaslsl / less-boilerplate.less
Created January 19, 2015 12:11
LESS Boilerplate
/*
LESS CSS BOILERPLATE
*/
@import "lesshat.less";
@import url(http://fonts.googleapis.com/css?family=Arvo:400,700);
/* RESET */
html, body, div, span, applet, object, iframe,
@jonaslsl
jonaslsl / gmaps-custom.js
Created January 19, 2015 18:54
google maps customized
<script>
function initialize() {
var mapCanvas = document.getElementById('mapsp');
var myLatlng = new google.maps.LatLng(-92.22222, -78.11122);
var iconBase = '<?php bloginfo('template_url'); ?>/img/';
var mapOptions = {
center: myLatlng,
zoom: 16
}
var map = new google.maps.Map(mapCanvas, mapOptions);
@jonaslsl
jonaslsl / draggable.js
Last active August 29, 2015 14:13 — forked from siongui/draggable.js
/**
* @see https://github.com/siongui/palidictionary/blob/master/static/js/draggable.js
* @see http://docs.angularjs.org/guide/compiler
*/
angular.module('draggableModule', []).
directive('draggable', ['$document' , function($document) {
return {
restrict: 'A',
link: function(scope, elm, attrs) {
.element {
position: relative;
top: 50%;
transform: translateY(-50%);
}
puts "Start"
input = File.read("./input.txt")
input.gsub!(/\r\n?/, "\n")
input.each_line do |line|
s = line.strip
puts "./arachni #{s} --report-save-path ./reports"
system("./arachni #{s} --report-save-path ./reports")
end
puts "End"