Skip to content

Instantly share code, notes, and snippets.

Sajad Dehshiri sajaddp

Block or report user

Report or block sajaddp

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@endel
endel / generateUserAgent.ts
Created Sep 13, 2018
Fake User Agent Generator
View generateUserAgent.ts
export function* generateUserAgent() {
let webkitVersion = 10;
let chromeVersion = 1000;
const so = [
'Windows NT 6.1; WOW64',
'Windows NT 6.2; Win64; x64',
"Windows NT 5.1; Win64; x64",,
'Macintosh; Intel Mac OS X 10_12_6',
"X11; Linux x86_64",
@gaearon
gaearon / modern_js.md
Last active Oct 13, 2019
Modern JavaScript in React Documentation
View modern_js.md

If you haven’t worked with JavaScript in the last few years, these three points should give you enough knowledge to feel comfortable reading the React documentation:

  • We define variables with let and const statements. For the purposes of the React documentation, you can consider them equivalent to var.
  • We use the class keyword to define JavaScript classes. There are two things worth remembering about them. Firstly, unlike with objects, you don't need to put commas between class method definitions. Secondly, unlike many other languages with classes, in JavaScript the value of this in a method [depends on how it is called](https://developer.mozilla.org/en-US/docs/Web/Jav
@sebkouba
sebkouba / ParentChild.es6
Created Feb 17, 2016
Basic example to pass values between parent and child components in React.
View ParentChild.es6
/**
* Basic example to pass values between parent and child components in React
* Seems to be in line with this
* http://stackoverflow.com/questions/24147331/react-the-right-way-to-pass-form-element-state-to-sibling-parent-elements
* Now I have the state in parent and child. Is that good or bad? Why would I need it in child?
* Could probably take that out
* */
class Parent extends React.Component {
constructor(props) {
super(props);
@odan
odan / xampp_php7_xdebug.md
Last active Oct 13, 2019
Installing Xdebug for XAMPP
View xampp_php7_xdebug.md
View CentOS 7 + Nginx + MySQL5.6 + PHP5.6 (Laravel5.1) インストール nginx+php-fpmで動作確認まで.md

CentOS 7 + Nginx + MySQL5.6 + PHP5.6 (Laravel5.1) インストール nginx+php-fpmで動作確認まで

環境

  • AWS EC2 t2.micro
  • CentOS Linux release 7.0.1406 (Core)
  • PHP 5.6.11
  • MySQL 5.6
  • Laravel Framework version 5.1.7 (LTS)
@ghinda
ghinda / object-to-form-data.js
Last active Oct 4, 2019
JavaScript Object to FormData, with support for nested objects, arrays and File objects. Includes Angular.js usage.
View object-to-form-data.js
// takes a {} object and returns a FormData object
var objectToFormData = function(obj, form, namespace) {
var fd = form || new FormData();
var formKey;
for(var property in obj) {
if(obj.hasOwnProperty(property)) {
if(namespace) {
@kevinSuttle
kevinSuttle / meta-tags.md
Last active Oct 13, 2019 — forked from lancejpollard/meta-tags.md
List of Usable HTML Meta and Link Tags
You can’t perform that action at this time.