Skip to content

Instantly share code, notes, and snippets.

View yshuman1's full-sized avatar
🎯
Focusing

Yasin Shuman yshuman1

🎯
Focusing
View GitHub Profile
@yshuman1
yshuman1 / doom.txt
Created August 1, 2023 19:22 — forked from hjertnes/doom.txt
Doom Emacs Cheatsheet
SPC
SPC: find file
, switch buffer
. browse files
: MX
; EX
< switch buffer
` eval
u universal arg
x pop up scratch
import React, { Component } from 'react';
import { connect } from 'react-redux';
import { Picker, Text } from 'react-native';
import { employeeUpdate, employeeCreate } from '../actions';
import { Card, CardSection, Input, Button } from './common';
class EmployeeCreate extends Component {
onButtonPress() {
const { name, phone, shift } = this.props;
import React from 'react';
import { Scene, Router } from 'react-native-router-flux';
import LoginForm from './components/LoginForm';
import EmployeeList from './components/EmployeeList';
const RouterComponent = () => {
return (
<Router>
<Scene key='root' hideNavBar>
<Scene key='auth'>
{
"LocationID": "EZG2KVT7E6ZNK",
"Categories": {
"objects": [
{
"ID": 0,
"CreatedAt": "0001-01-01T00:00:00Z",
"UpdatedAt": "0001-01-01T00:00:00Z",
"DeletedAt": null,
"type": "CATEGORY",
Launching lib/main.dart on iPad Retina in debug mode...
Running Xcode build...
├─Assembling Flutter resources... 3.1s
└─Compiling, linking and signing... 2.9s
Xcode build done. 8.5s
PackageType = Developer;
SimulatorRootPath = "/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS 9.0.simruntime/Contents/Resources/RuntimeRoot";
SimulatorUserPath = "/Users/yasin/Library/Developer/CoreSimulator/Devices/6ECA4F0D-1860-4099-8663-B767F81F28F8/data";
}
state->old_bundle: /Users/yasin/Library/Developer/CoreSimulator/Devices/6ECA4F0D-1860-4099-8663-B767F81F28F8/data/Containers/Bundle/Application/5743EC08-0464-43E7-A67E-E5AF4A2E1AF6/Runner.app
# internal/race
compile: version "go1.11" does not match go tool version "go1.12.1"
# errors
compile: version "go1.11" does not match go tool version "go1.12.1"
# runtime/internal/sys
compile: version "go1.11" does not match go tool version "go1.12.1"
# runtime/internal/atomic
flag provided but not defined: -gensymabis
usage: asm [options] file.s ...
Flags:
func reverse(s string) string {
bytes:=[]byte(s)
i, j :=0, len(bytes)-1
for i < j {
bytes[i], bytes[j] = bytes[j], bytes[i]
i++
j--
}
return string(bytes)
}
func reverse(bytes []byte) {
i, j := 0, len(bytes)-1
for i < j {
bytes[i], bytes[j] = bytes[j], bytes[i]
i++
j--
}
}
func min(a,b int)int{
body, _ := ioutil.ReadAll(resp.Body)
//create a slice of type Items and unmarshal json to slice
type inventory struct {
Type string `json:"type"`
Data json.RawMessage
}
var invData inventory
if err := json.Unmarshal(body, &invData); err != nil {
log.Infof("\nError unmarshaling json body for item data: %#v\n", err)
return nil, err
type AutoGenerated struct {
Objects []struct {
Type string `json:"type"`
ID string `json:"id"`
UpdatedAt time.Time `json:"updated_at"`
Version int64 `json:"version"`
IsDeleted bool `json:"is_deleted"`
PresentAtAllLocations bool `json:"present_at_all_locations"`
PresentAtLocationIds []string `json:"present_at_location_ids,omitempty"`
AbsentAtLocationIds []string `json:"absent_at_location_ids,omitempty"`