Skip to content

Instantly share code, notes, and snippets.

View JWPapi's full-sized avatar
🎆

Julian M. Wagner JWPapi

🎆
View GitHub Profile
@JWPapi
JWPapi / fetch.js
Last active June 20, 2016 09:03
Fetch.js
export default createContainer((params) => {
Meteor.subscribe('events');
const eventlist = Events.find({}, {
sort: {
start_time: 1
}
}).fetch().filter(event => {
let location = params.location;
let timediff = Date.parse(event.start_time) - Date.now();
return (location === undefined) || location === event.location) && timediff > -(6 * 60 * 60 * 1000) && timediff < 90 * 24 * 60 * 60 * 1000});
gyp ERR! configure error
gyp ERR! stack Error: Can't find Python executable "C:\Users\jwagner\AppData\Local\.
mt-os.windows.x86_32\dev_bundle\python\python.exe", you can set the PYTHON env varia
gyp ERR! stack at failNoPython (C:\Users\jwagner\AppData\Local\.meteor\packages\
6_32\dev_bundle\lib\node_modules\npm\node_modules\node-gyp\lib\configure.js:449:14)
gyp ERR! stack at C:\Users\jwagner\AppData\Local\.meteor\packages\meteor-tool\1.
e\lib\node_modules\npm\node_modules\node-gyp\lib\configure.js:404:11
gyp ERR! stack at FSReqWrap.oncomplete (fs.js:82:15)
gyp ERR! System Windows_NT 10.0.10240
gyp ERR! command "C:\\Users\\jwagner\\AppData\\Local\\.meteor\\packages\\meteor-tool
@JWPapi
JWPapi / App.jsx
Last active November 22, 2016 09:07
import React, {Component, PropTypes} from 'react'
import MainPage from './MainPage'
import ClubOverview from './ClubOverview'
import Board from './Board'
import {Page, Navigator, Tabbar, Tab} from 'react-onsenui'
require('moment/locale/de')
class Tabs extends Component {
constructor (props) {
super(props)
import React, {Component, PropTypes} from 'react'
import MainPage from './MainPage'
import ClubOverview from './ClubOverview'
import {Page, Navigator, Tabbar, Tab} from 'react-onsenui'
require('moment/locale/de')
class Tabs extends Component {
renderTabs () {
return (
<VirtualHost *:80>
ServerName igbot.lifestyle.cool
ServerAlias igbot.lifestyle.cool
DocumentRoot /var/www/html/igbot_saas/public
DirectoryIndex /index.php
<Directory /var/www/html/igbot_saas/public>
AllowOverride None
Order Allow,Deny
$form = $this->createFormBuilder()
->add('username', TextType::class)
->add('password', TextType::class)
->add('save', SubmitType::class, ['label' => 'Add Account'])
->getForm();
$twoFactorform = $this->createFormBuilder()
->add('Code', TextType::class)
->getForm();
class Example {
private $date = date('Y-m-d H-i-s', time());
function exampleFunc() {
$newDate = $this->date;
echo $newDate
}
}
@JWPapi
JWPapi / Model
Last active October 9, 2019 02:31
DTO in Symfony
<?php
namespace App\Model;
class igUserInfoModel {
public $username;
public $status;
public $following_count;
public $follower_count;
public $media_count;
public $storiesWatched;
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
IQKeyboardManager.shared.enable = true
IQKeyboardManager.shared.enableAutoToolbar = false
FirebaseApp.configure()
Messaging.messaging().delegate = self
UNUserNotificationCenter.current().delegate = self
let authOptions: UNAuthorizationOptions = [.alert, .badge, .sound]
UNUserNotificationCenter.current().requestAuthorization(options: authOptions,completionHandler: {_, _ in })
@JWPapi
JWPapi / gist:c0aa4a45360bfac85c144091b83de1d0
Created December 5, 2019 00:09
where to put users.count
if users.count > 0 {
if friendAttendees.count > 0 {
attendeesString.append(getYouOrFriendString(uid: friendAttendees[0].uid!, userName: friendAttendees[0].name))
}
if friendAttendees.count > 1 {
attendeesString.append(getYouOrFriendString(uid: friendAttendees[1].uid!, userName: friendAttendees[1].name))
}
if strangerAttendeeCount > 0 {