Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

View marffinn's full-sized avatar
🏠
Working from home

Tomasz Drozdowski marffinn

🏠
Working from home
View GitHub Profile
anonymous
anonymous / gist:5225890
Created March 23, 2013 01:03
<!DOCTYPE html>
<html lang="en">
<head>
<title>three.js webgl - morphtargets - MD2 controls</title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, user-scalable=no, minimum-scale=1.0, maximum-scale=1.0">
<style>
body {
color: #000;
font-family:Monospace;
@kosinix
kosinix / custom-nav-walker-usage.php
Last active April 25, 2023 09:32
WordPress: Using a custom nav walker to create navigation menus in plain <a> tags. That is the <ul> and <li> tags are not present. Very useful if you want to create simple links that can be centered with a simple text-align:center on the containing element.
<?php
// In your template files like footer.php
// The items_wrap value ('%3$s') removes the wrapping <ul>, while the custom walker (Nav_Footer_Walker) removes the <li>'s.
wp_nav_menu(array('items_wrap'=> '%3$s', 'walker' => new Nav_Footer_Walker(), 'container'=>false, 'menu_class' => '', 'theme_location'=>'footer', 'fallback_cb'=>false ));
?>
@jobsamuel
jobsamuel / readme.md
Last active January 19, 2024 18:26
Run NodeJS as a Service on Ubuntu 14.04 LTS

Run NodeJS as a Service on Ubuntu 14.04 LTS

With Node you can write very fast JavaScript programs serverside. It's pretty easy to install Node, code your program, and run it. But > how do you make it run nicely in the background like a true server?

  • Go to /etc/init/
  • $ sudo vim yourapp.conf
  • Paste script.conf
  • $ sudo start yourapp
  • And when you wanna kill the process $ sudo stop yourapp
@themepaint
themepaint / Woocommerce Price Filter CSS
Created February 2, 2016 08:20
Woocommerce Price Filter CSS
.price_slider{
margin-bottom: 1em;
}
.price_slider_amount {
text-align: right;
line-height: 2.4em;
font-size: 0.8751em;
}
@msurguy
msurguy / ESPSockets.ino
Created March 7, 2016 19:37
ESP8266 Websocket + FastLED
/*
When the sketch is uploaded, the ESP8266 will reboot and create its own access point called AutoConnect AP. Connecting to that AP will bring up the
list of available access points. Enter Username and PW for the access point and ESP module will save the credentials for you.
When the module is restarted, it will connect to the AP that you chose and should be available on the network. You can get its IP from the Serial monitor
or use mDNS library (it's uncommented by default, along with all usage of the library) to make the module discoverable.
To change colors on the module (Neopixels on Pin 2), simply go to the root URL of the web server.
@fodra
fodra / electron-packager-extra-resource.md
Created December 18, 2017 06:29
Command to add extra resources in your electron app

This is the example usage of electron-packager that I never found online anywhere else.

To add resource.exe and resource2.dll in the resource folder when you create an installer, this is how you do it with the --extra-resource commandline switch.

--extra-resource

electron-packager . --overwrite --asar --extra-resource="resource1.exe" --extra-resource="resource2.dll" --platform=win32 --arch=ia32 --icon=./frontend/dist/assets/icon.ico --prune=true --out=./build --version-string.ProductName='Hot Pan de sal'

within the backend code you can refer to the files as: