This file contains hidden or 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
var mediaJSON = { "categories" : [ { "name" : "Movies", | |
"videos" : [ | |
{ "description" : "Big Buck Bunny tells the story of a giant rabbit with a heart bigger than himself. When one sunny day three rodents rudely harass him, something snaps... and the rabbit ain't no bunny anymore! In the typical cartoon tradition he prepares the nasty rodents a comical revenge.\n\nLicensed under the Creative Commons Attribution license\nhttp://www.bigbuckbunny.org", | |
"sources" : [ "http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/BigBuckBunny.mp4" ], | |
"subtitle" : "By Blender Foundation", | |
"thumb" : "images/BigBuckBunny.jpg", | |
"title" : "Big Buck Bunny" | |
}, | |
{ "description" : "The first Blender Open Movie from 2006", | |
"sources" : [ "http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/ElephantsDream.mp4" ], |
This file contains hidden or 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
What do square brackets [] around e.target.name mean? | |
this.setState({ [e.target.name] : e.target.value}); | |
Instead of this: | |
<input type="text" name="title" onChange={this.onTitleChange} value={this.state.title} /> | |
<input type="text" name="address" onChange={this.onAddressChange} value={this.state.address} /> | |
<input type="text" name="description" onChange={this.onDescriptionChange} value={this.state.description} /> | |
onTitleChange (e) { |
This file contains hidden or 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
Windows 10 includes a feature called "Hosted Network" that allows you to turn your computer into a wireless hotspot, | |
Use the Windows key + X keyboard shortcut, and select Command Prompt (Admin). | |
#1 Open win cmd prompt (Run as Admin) | |
#2 Does your Wireless Adapter (hardware device) support Hosted Network ? | |
(IF NOT, you are out of luck; try using another external USB wireless adapter that supports the feature). | |
) | |
>NETSH WLAN show drivers |
This file contains hidden or 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
//Encode | |
public static string Base64Encode(string plainText) { | |
var plainTextBytes = System.Text.Encoding.UTF8.GetBytes(plainText); | |
return System.Convert.ToBase64String(plainTextBytes); | |
} | |
//Decode | |
public static string Base64Decode(string base64EncodedData) { | |
var base64EncodedBytes = System.Convert.FromBase64String(base64EncodedData); |
This file contains hidden or 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
using System.Xml; | |
using System.Xml.Linq; | |
namespace XmlLib | |
{ | |
/// <summary> | |
/// Provides extension methods for simple conversion between System.Xml and System.Xml.Linq classes. | |
/// </summary> | |
/// <remarks>From: http://brianary.blogspot.com/2010/02/converting-between-xdocument-and.html</remarks> | |
public static class XmlLinqConversionExtensions |
This file contains hidden or 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
public static XElement ToXElement(this XmlElement xmlelement) | |
{ | |
return XElement.Load(xmlelement.CreateNavigator().ReadSubtree()); | |
} | |
public static XmlDocument ToXmlDocument(this XDocument xdoc) | |
{ | |
var xmldoc = new XmlDocument(); | |
xmldoc.Load(xdoc.CreateReader()); | |
return xmldoc; |
This file contains hidden or 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
[{ | |
"id": 1, | |
"name": "akira" | |
}, | |
{ | |
"id": 2, | |
"name": "fubuki" | |
}, | |
{ | |
"id": 3, |
This file contains hidden or 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
Go to Gist home, https://gist.github.com/ | |
In githubs search type: | |
--- | |
user:joe-oli whatever you want to search | |
Other searches: | |
------ | |
Get all gists from the user santisbon. |
This file contains hidden or 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
[ | |
{ | |
"Title": "Under the Silver Lake", | |
"Year": "2018", | |
"Director": "David Robert Mitchell", | |
"Actors": "Andrew Garfield, Wendy Vanden Heuvel, Deborah Geffner, Riley Keough", | |
"Plot": "Sam, intelligent but without purpose, finds a mysterious woman swimming in his apartment's pool one night. The next morning, she disappears. Sam sets off across LA to find her, and along the way he uncovers a conspiracy far more bizarre." | |
}, | |
{ | |
"Title": "The Appearance", |
This file contains hidden or 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
On the Bootstrap 3 media queries documentation it says: | |
We use the following media queries in our Less files to create the key breakpoints in our grid system. | |
Extra small devices (phones, less than 768px): No media query since this is the default in Bootstrap | |
Small devices (tablets, 768px and up): @media (min-width: @screen-sm-min) { ... } | |
Medium devices (desktops, 992px and up): @media (min-width: @screen-md-min) { ... } |