Videos uploaded by user “optikalefx”
In most spread sheet applications like excel or google docs, you have the ability to SUM only certain rows in a column IF they meet certain criteria. Well with a mysql database, it's like a complicated spreadsheet, so we should be able to do the same thing. Here we learn how to combine a mysql SUM function with a mysql IF statement to achieve this.
Views: 7639 optikalefx
MongoDB Complex Queries Explained
We take this pet project called Sprout, and some plant hardiness zone data, and we run some queries on it. Using this we are able to find out what plants to plant in your area depending on the month. We also look at this code in NodeJS.
Views: 35998 optikalefx
Javascript Reduce and Map In Depth. Explained.
Everyone knows about Array.forEach, but Array.forEach is just an abstraction for Array.reduce, the core of the Array methods. Let's dive in.
Views: 20095 optikalefx
mySQL Find Duplicates
How often do you have to get into someones database and fix stuff? And the problem is because they didn't unique key something, and now you have a ton of duplicates. Super annoying right? Well with this little bit of sql you can find all the duplicates and then deal with them. So get rid of them and then unique that field.
Views: 7076 optikalefx
Using Text Wrangler - Advanced part 1
changing and setting language setting font style show invisibles (cmd z and shift cmd z) show line numbers showing what line your on soft wrap vs hard wrap creating custom keyboard shortcut for comments split code view function jumping using markers how to tab and detab (cmd bracket) moving between documents (cmd opt bracket) find find next (cmd g) quick find (cmd opt f)
Views: 52381 optikalefx
jQuery Autofill / Complete with Tagging
Tagging and autofill are super useful input methods for sites. Here we make both plugins, and combine them together. Ok we don't make them in the video, but I show you how to use them. Both sources are here https://github.com/optikalefx/OpenJS-Autofill https://github.com/optikalefx/OpenJS-Tags
Views: 17188 optikalefx
Regex Phone Number - Step by Step
This is the basics of a phone number regex to just help you understand how to write regex in general VIDEO CORRECTION!! The end of the regex needs to be a $ not a ? ^\+?\d.\s? // +1 or +44 \(?\d{3}\)? // first part [-.\s]? // possible spacing / sep \d{3} // 2nd part [-.\s]? // possible spacing / sep \d{4}? // 3rd part
Views: 22789 optikalefx
How to make a public JSON API
using PHP we can make our own API then we can use that api with jquery and JSONP NOTE!!!! - usually API's have some kind of authentication, so do that. That way you know who is using your API.
Views: 68940 optikalefx
Floating and Clearing with CSS - fixing all those problems
When you float elements you need to clear afterwards so you can add content after. HOWEVER if you just set the parent to overflow:auto, it fixes everything
Views: 23377 optikalefx
Web Scraping with Puppeteer, NodeJS & Shopify
I really love Google's Puppeteer. It's a great utility for PDF generation, screenshots and web scraping. Today we look at how to scrape some public shopify data using Puppeteer. We need to put together a lot of the async-await things from the last few videos.
Views: 18970 optikalefx
jQuery FancyBox - Vimeo Popout videos
using the fancybox iframe technique we can use the vimeo and youtube iframe embed codes to get that lightbox pop out effect
Views: 24422 optikalefx
jQuery Find vs. FIlter
Learn the difference between find and filter in jquery. find - looks for a match in the children filter - looks for a match in the current selection
Views: 3453 optikalefx
So you want video on your website?
Compare and contrast the millions of ways to get video on your website Conclusion: If you want to get popular use youtube: If you want your videos to be cutting edge and unique make an html5 player from scratch with flash fallback: If you want to just get something up on your site fast use a JW Player: If you want to monetize your videos with ads, customize JW or Flow player: If you expect A LOT of traffic and video streams need to be fast, get a CDN:
Views: 4760 optikalefx
PHP Read a Directory and Write a File
learn how to read a directory with PHP and then create a text file out of which you read.
Views: 13317 optikalefx
Super Simple AJAX File Upload
Seriously, it doesn't get more simple than this. I made a jQuery plugin that uses XHR2 and jQuery (of course) to upload files with ajax. Gist of the plugin is here https://gist.github.com/4504947
Views: 52072 optikalefx
Paypal Adaptive Payments - Parallel Payments JSON Part 1
Adaptive payments is a FREE api that allows you as the developer to pay multiple people at once. We go over how to create this request in PHP, including setting item details about the order. Please see part 2 for the continuation of this tutorial. Note!!!! in the video we extend app, just get rid of that. I only did that for my own setup.
Views: 21527 optikalefx
Generate PDFs (From HTML & CSS) with NodeJS and Puppeteer
Oh man! This is a great tool to generate PDFs from HTML. We build a little template engine with handlebars, and render that into a PDF on the fly with puppeteer.
Views: 13525 optikalefx
Multiple Email Attachments with PHP
https://gist.github.com/optikalefx/5149537 This is a revisit of the previous video to solve some problems those have had. This is also allows multiple email attachments as opposed to just 1
Views: 31281 optikalefx
Using Text Wrangler - Advanced part 2
find in multiple documents setting up places using regex in find label.(.*) goto line (cmd j) check spelling (shift cmd semi colin) compare 2 files stop re opening everything on start up
Views: 12069 optikalefx
htaccess not working? Not being read? Fix!
By changing a few permissions and adding the rewrite module we can make sure htaccess is working
Views: 9659 optikalefx
Don't Print the "Print this page" button  - Control your printing
With CSS we can control what prints when the users tries to print your page
Views: 5781 optikalefx
preload images with jquery
Views: 7184 optikalefx
jQuery AJAX Tabs
Sorry Im getting kind of sick. Using $.get we can load any content we want via ajax into a div
Views: 19136 optikalefx
Get objects from Amazon S3 using NodeJS
NodeJS again! This time we dive into the S3 API from Amazon AWS for node. Getting objects is slightly tricky, so we'll look at how to accomplish this.
Views: 4863 optikalefx
CSS Three Pane Layout with Fluid 3rd pane
So this a great interface for admin panels and backends. Its 2 fixed panels, with 1 fluid panel on the right. the key here is that the parent is set to position static. then each of the divs have a top and bottom set, as well as a width for the static ones.
Views: 3638 optikalefx
Extreme Color Control in Aperture
Here we learn how to really control every individual aspect of colors in your photo in Aperture.
Views: 1153 optikalefx
Regex Validating Email in Javascript - Explained
Ill explain to you how to write a regex for checking for a valid email, but with explanation to each part. The final regex is [a-zA-Z0-9_\.-][email protected][a-zA-Z0-9-]+\.[a-zA-Z0-9\.]{2,5}$
Views: 5918 optikalefx
PHP Pretty Fatal Errors
Using a small htaccess line and the use of some clever core php functions you can prettify your PHP errors and finally get rid of that damn white screen with black text. Using error_get_last() and register_shutdown_function() the world of ugly errors is a thing of the past
Views: 2130 optikalefx
Using Remote PHP files with cURL
using cURL we can call a remote php file and have it process data and send it back all within the same php file before the page ever loads
Views: 11663 optikalefx
mySQL Triggers  - How To
mysql triggers are little programs that run before or after a sql call to then do something else behind the scenes.
Views: 48466 optikalefx
PHP docx Token Replacment
Because docx files are actually just zipped up files and xml, we can unzip them with php, string replace for tokens, and then rezip it all back up. Now you can make cool docx templates for your friends!
Views: 4320 optikalefx
Chrome Extension OOP with Persistent Data
Here we learn how to build a chrome extension with an object oriented mind set. We pass data from background to popup using messages so we can persist data between popup openings.
Views: 4081 optikalefx
More TextWrangler Regex
Views: 7944 optikalefx
SEO friendly URLs
Have a bunch of URLs that are all index.php?pageid=23423&whater=asdfasd&somethig=asdf? And you want to change it to www.site.com/clean? htaccess is how
Views: 17800 optikalefx
Live Search with Ajax
Live search a mysql database with Mysql, php, jquery, ajax, javascript, html. Sound complicated? Its not. All you have to do is create a keyup listener on a text box and just make sql calls using ajax to grab the data.
Views: 66884 optikalefx
Slack Custom Webhook API Basics - Build a Slack Bot (NodeJS)
Slack has such an easy API to work with when it comes to webhooks. They actually have several APIs, and several ways of doing the same task. In this video we take a look at one of these ways, which is using a custom web hook.
Views: 5644 optikalefx
Remote SSH into Virtual Machine  - vmware fusion mac
this is how to remote into your ubuntu virtual machine running on vmware fusion on your mac basically it goes like this: - outside ip address - specific port on your router - to your computer ip in your house - to the internal port on your router - to the virtual machine external port - to the virtual machine local ip address - using the internal port 22 for ssh
Views: 14418 optikalefx
PHP mail attachment - sending an attachment with PHP
sending an email with php is easy, an attachment is a bit harder, but possible. Here are somethings you will need from the video (note, just SOME of the things) $content = chunk_split(base64_encode(file_get_contents($file))); $header .= "Content-Type: multipart/mixed; boundary=\"".$uid."\"\r\n\r\n"; $header .= "Content-Transfer-Encoding: base64\r\n"; $header .= "Content-Disposition: attachment; filename=\"".$file_name."\"\r\n\r\n"; $header .= "Content-type:text/plain; charset=iso-8859-1\r\n"; $header .= "Content-Transfer-Encoding: 7bit\r\n\r\n"; FAST VIDEO
Views: 89727 optikalefx
Air Drone helicopter using iPad
So if anyone wonders what I do for a job. This is part of it. We got 2 free airdrones from parrot, and got to play with them today. They are REALLY fun to play with. But they only last 15 to 20 minutes. Idk if its worth $300, but hey, if you have a REALLY responsible kid, or can handle it, its a great gift
Views: 138516 optikalefx
OpenJS Grid - an Open Source JQuery Grid
Open JS Grid is a really really simple to use grid component built into jquery. The downfall of a lot of JS grids out there, is the setup is pretty hard. Well the secret sauce here is the helper PHP class that does all the hard work for you. Download at http://square-bracket.com/openjs This component brings together my knowledge of PHP and Javascript along with jQuery to deliver a really powerful, yet easy to use grid. Features include: adding a title changing columns initial widths initial sort orders paging searching column resizing global resizing column flexing column hiding column selecting freeze rows complex fields complex joins complex wheres multiple tables
Views: 47524 optikalefx
How to make a Private API
This is an overview of how to make a private api. Basically you do this: 1) send unique developer identifier and app unique identifier 2) make sure that developer and that app exist 3) create a signature and store it for use with all api calls from this developer 4) make api calls using that signature 5) api makes sure that signature is valid and belongs to you
Views: 17693 optikalefx
Install FFMPEG on Mac
Learn how to instal FFMPEG on mac. http://stephenjungels.com/jungels.net/articles/ffmpeg-howto.html Note, I did need to have XCODE and I did have to create the FFMPEG Folder
Views: 38328 optikalefx
jQuery Simulate Click and Load content from URL
using the hash of a URL we can load certain dynamic content automatically. We can utilize jquery's ability to simulate events.
Views: 15261 optikalefx
Awesome CSS3 3D Image Slider.  With Flickr!
You know you love CSS3 and HTML5 and all that jazz. Well SliceBox is this amazing 3d image rotator that I fell in love with. The problem is that its all manual. So i made a quick plugin that wraps slicebox with the flickr api (kind of) so slicebox is automatically loaded with flickr! w00t! Source! http://code.google.com/p/slicebox-flickr/downloads/list
Views: 129022 optikalefx
Detecting Key Press in Jquery
need to have the escape key make something happen on your page? check it out!
Views: 6439 optikalefx
CSS Sprites - Speed up your website
Website loading slowly? Try putting all your images into one CSS sprite image. I show you how to make them and execute with photoshop. Follow me on twitter. @4ten
Views: 13240 optikalefx
mysql has an implode function, its called group_concat Basically it allows you grab many rows from 1 table and concat them by a comma (or other) so you still get your 1 result you were expecting
Views: 5907 optikalefx
Javascript Object to a PHP Object
I show you a function I made that lets you use your javascript object as a php object. Basically it takes your JS object and turns into a JSON string that PHP decodes. The key to making this work is stripping strings once you json_decode, because it addes slashes when it goes through post. The other key, is to take into account indexed arrays, that way if a property of a JS object is an array, it will still be an array when it gets to PHP.
Views: 22456 optikalefx
Generate CSV and Download it Client Side from the Browser
Sometimes you need to give people the ability to export CSVs. And sometimes you have all the data already in your react/angular/ember/polymer/vue app. In this case, you can use this technique to avoid making a trip to your server to generate a report for data you already have.
Views: 5072 optikalefx
MySQL Crazy Fast Stored Functions
Did you know about the Memory MYSQL engine? How about caching function parameters and results with a time period so that you can call a function repeatedly? Yea, Neither did I.
Views: 3503 optikalefx

Fucking my little sis
Ll do it don give a fuck
Sprogcenter aalborg danish online dating
Dating sites seattle washington