Skip to content

Instantly share code, notes, and snippets.

curl 'http://localhost:3000/api/project-unit-attach/'
-H 'Pragma: no-cache'
-H 'Origin: http://localhost:3000'
-H 'Accept-Encoding: gzip, deflate, br'
-H 'Accept-Language: en-US,en;q=0.9,ru-RU;q=0.8,ru;q=0.7'
-H 'User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/72.0.3626.96 Safari/537.36'
-H 'Content-Type: multipart/form-data; boundary=----WebKitFormBoundarylWSEVMfoFbMJtzUd'
-H 'Accept: application/json'
-H 'Cache-Control: no-cache'
-H 'Referer: http://localhost:3000/project/21/upload/unit-attach/164'
@ivan-hilckov
ivan-hilckov / LittleSnitch_Block_List.md
Created January 1, 2019 21:07 — forked from SethCalkins/LittleSnitch_Block_List.md
Little Snitch Script to block Ad Servers

Here is a script to take the hosts from From http://pgl.yoyo.org/adservers/ and convert them to rules for Little Snitch.

It has options to grab the entire list or grab new entries past a certain date.

Just grab the output and copy/paste into Little Snitch.

The script is written to block access to any process, any port. You can also delete those lines and it will only block Mail. Or use the options to enter any process, port or protocol you want to block.

let UserContext = React.createContext();
class App extends React.Component {
state = {
user: null,
setUser: user => {
this.setState({ user });
}
};
@ivan-hilckov
ivan-hilckov / option1.py
Created November 5, 2018 23:09 — forked from douglasmiranda/option1.py
Fix: Django Debug Toolbar not showing when using with Docker.
# If you don't do this you will have to add the host IP in INTERNAL_IPS = ('127.0.0.1',)
# And it will change, then you will have to change INTERNAL_IPS again.
def show_toolbar(request):
if request.is_ajax():
return False
return True
DEBUG_TOOLBAR_CONFIG = {
'SHOW_TOOLBAR_CALLBACK': 'config.local.show_toolbar',
@ivan-hilckov
ivan-hilckov / yarn.unlock.md
Created November 4, 2018 03:45 — forked from RadValentin/yarn.unlock.md
Solve `yarn.lock` or `package.json` conflicts without losing your mind

NOTE: This guide is ONLY for devs who don't want to edit their yarn.lock file by hand. If you don't care about that please carry on.


So you've pulled the latest master

git checkout master
git pull
@ivan-hilckov
ivan-hilckov / commands.js
Created October 25, 2018 15:22
Общие куски для всех тестов
import { URLS, PATH_NAME } from '../../src/constants/path'
import ENDPOINTS from '../../src/constants/endpoints'
// ***********************************************
// This example commands.js shows you how to
// create various custom commands and overwrite
// existing commands.
//
// For more comprehensive examples of custom
// commands please read more here:
// https://on.cypress.io/custom-commands
@ivan-hilckov
ivan-hilckov / project.spec.js
Created October 25, 2018 15:18
Спека для страницы /project/:projectId
/// <reference types="Cypress" />
import { URLS, PATH_NAME } from '../../src/constants/path'
const projectId = 3
const ids = {
layer: 'layer-add',
}
describe('Project', () => {
@ivan-hilckov
ivan-hilckov / layer.spec.js
Created October 25, 2018 15:17
Спека для страницы /project/:projectId/layer
/// <reference types="Cypress" />
import { URLS, PATH_NAME } from '../../src/constants/path'
const projectId = 3
const notExistProjectId = 9999
const ids = {
close: 'close',
title: 'form-title',
subtitle: 'form-subtitle',
@ivan-hilckov
ivan-hilckov / testId.js
Created October 25, 2018 15:14
айдишки для cypress
import get from 'lodash/get'
import { isDevelopment } from 'utils/isDevelopment'
export const TEST_ID = {
components: {
LayerCard: {
image: 'components.LayerCard.image',
vector: 'components.LayerCard.vector',
cad: 'components.LayerCard.cad',
xyz: 'components.LayerCard.xyz',
{
"version": "0.2.0",
"configurations": [
{
"name": "Chrome Canary",
"type": "chrome",
"request": "launch",
"url": "http://localhost:3000",
"webRoot": "${workspaceRoot}/src",
"sourceMapPathOverrides": {