Skip to content

Instantly share code, notes, and snippets.

Fabio Cigliano lidio601

Block or report user

Report or block lidio601

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
@lidio601
lidio601 / react_native_starter.sh
Last active Oct 2, 2019
React Native app starter kit
View react_native_starter.sh
# ensure right cli is installed
npm uninstall -g react-native-cli
npm i -g @react-native-community/cli
# create app from template
APPNAME=myapp
npx react-native init ${APPNAME} --template react-native-template-typescript
cd ${APPNAME}
@lidio601
lidio601 / AppDelegate.m
Last active Jul 31, 2019
React Native - native module started kit (iOs)
View AppDelegate.m
// ...
#import "FooModule.h"
// ...
@interface AppDelegate ()
// ...
@property (nonatomic, strong) FooModule *fooModule;
// ...
@end
View fibonacci.js
function fibonacci (n) {
if (n < 1) return 0;
var a = [1, 1];
var sum = 1;
while (n-- > 2) {
sum += a[0];
a = a.slice(1).concat(sum);
}
return sum;
}
View update.20181121.log
This file has been truncated, but you can view the full file.
23:19:37 stopping lamassu-server
lamassu-server: stopped
lamassu-admin-server: stopped
23:19:37 archiving old lamassu-server installation located in /usr/lib/node_modules/lamassu-server
tar: Removing leading `/' from member names
removed '/usr/lib/node_modules/lamassu-server/todo.txt'
removed '/usr/lib/node_modules/lamassu-server/.jshintrc'
removed '/usr/lib/node_modules/lamassu-server/currencies.json'
removed '/usr/lib/node_modules/lamassu-server/data-notes.txt'
View update.20181121.log
04:11:06 stopping lamassu-server
lamassu-server: ERROR (not running)
lamassu-admin-server: ERROR (not running)
04:11:06 unlinking old /usr/local/bin/lamassu* executables
04:11:06 updating node
/usr/local/bin/n -> /usr/local/lib/node_modules/n/bin/n
+ n@2.1.12
updated 1 package in 0.336s
04:11:08 version installed v10.13.0
04:11:08 updating lamassu-server#master
View install.log
02:50:15 Enabling swap file for install only...
Setting up swapspace version 1, size = 1024 MiB (1073737728 bytes)
no label, UUID=6d85a17f-26ae-4535-8444-ed542394032c
02:50:15 Updating system...
## Installing the NodeSource Node.js 8.x LTS Carbon repo...
## Populating apt-get cache...
View install.log
03:50:44 Enabling swap file for install only...
Setting up swapspace version 1, size = 1024 MiB (1073737728 bytes)
no label, UUID=b156c57e-8121-4823-b969-314343283932
03:50:44 Updating system...
## Installing the NodeSource Node.js 8.x LTS Carbon repo...
## Populating apt-get cache...
@lidio601
lidio601 / README.md
Last active Oct 29, 2018
Nginx + PHPfpm timeout test
View README.md

Nginx + PHPfpm timeout test

Test the connection timeout by tweaking those parameters: fastcgi_read_timeout, request_terminate_timeout, set_time_limit.

  • If hitting the fastcgi_read_timeout setting, Nginx will terminate the HTTP connection with a HTTP 504
  • If hitting the request_terminate_timeout setting, PHPfpm will terminate the HTTP connection with a HTTP 502
  • If hitting the set_time_limit setting, PHP itself will terminate the HTTP connection with a HTTP 200
@lidio601
lidio601 / kill_zombies.sh
Created Nov 24, 2017
Kill all zombie processes
View kill_zombies.sh
kill $(ps -A -ostat,ppid | awk '/[zZ]/{print $2}')
@lidio601
lidio601 / crawl_website.sh
Created Nov 20, 2017
Crawl an entire website (pages + resources) into a local folder
View crawl_website.sh
# Simple as is
wget --recursive --page-requisites --convert-links www.libero.it
You can’t perform that action at this time.