Skip to content

Instantly share code, notes, and snippets.

View scicco's full-sized avatar

scicco

View GitHub Profile
class Data
class << self
def all
(1..10).to_a
end
def created
[4, 5, 6, 8, 9]
git rev-parse --short HEAD
#!/bin/bash
for listfile in /var/lib/dpkg/info/*.list; do
listfilename=$(basename -- "$listfile")
listfilename="${listfilename%.*}"
echo ${listfilename}
#break
output=$(file ${listfile}| awk '{print $2}')
#echo "${output}"
if [[ $output == *"data"* ]]; then
echo "${listfile} is DATA!"
#!/bin/bash
for listfile in /var/lib/dpkg/info/*.list.broken; do
#echo ${listfile##*/}
listfilename=$(basename -- "$listfile")
listfilename="${listfilename%.*}"
echo "list file name: ${listfilename}"
if [ -f "/var/lib/dpkg/info/${listfilename}" ]; then
output=$(file "/var/lib/dpkg/info/${listfilename}" | awk '{print $2}')
echo $output
#break
@scicco
scicco / nginx_puma_rails_app.conf
Last active May 30, 2018 13:57
nginx + rails + puma + letsencrypt
#
#/etc/nginx/sites_available/rails_app
#
upstream rails_app {
server unix:///home/deployer/apps/rails_app/shared/tmp/sockets/puma.sock fail_timeout=0;
}
server {
listen 80;
@scicco
scicco / generate_dhparam.pem
Created June 26, 2018 08:15
generate dhparam.pem file
openssl dhparam -out /etc/ssl/certs/dhparam.pem 4096
@scicco
scicco / list_aws_certificates
Created August 2, 2018 07:52
list aws certificates
aws acm list-certificates --profile=<profile_name>
@scicco
scicco / check local certificate
Created August 30, 2018 09:26
check configuration of a local certificate
openssl s_client -CApath /etc/ssl/certs/ -connect address.com:443
@scicco
scicco / mapbox_webgl_error.log
Last active March 17, 2020 14:11
mapbox compiler error
Failed running python -E "/Applications/Unity/Hub/Editor/2019.3.5f1/PlaybackEngines/WebGLSupport/BuildTools/Emscripten/emcc" @"/Users/username/prj/Lzero/Assets/../Temp/emcc_arguments.resp"
stdout:
stderr:warning: unexpected number of arguments 1 in call to '__cxa_pure_virtual', should be 0warning: unexpected number of arguments 2 in call to '_ZN6il2cpp6icalls8mscorlib6System6String22RedirectToCreateStringEv', should be 0warning: unexpected number of arguments 4 in call to '_ZN6il2cpp6icalls8mscorlib6System6String22RedirectToCreateStringEv', should be 0warning: unexpected number of arguments 2 in call to '_ZN6il2cpp6icalls8mscorlib6System6String22RedirectToCreateStringEv', should be 0warning: unexpected number of arguments 4 in call to '_ZN6il2cpp6icalls8mscorlib6System6String22RedirectToCreateStringEv', should be 0warning: unexpected number of arguments 5 in call to '_ZN6il2cpp6icalls8mscorlib6System6String22RedirectToCreateStringEv', should b
@scicco
scicco / print_ruby_version.sh
Last active July 3, 2020 09:04
print .ruby-version file of all subfolders
#!/bin/bash
for file in *;
do
if [ -f "./$file/.ruby-version" ]; then
cat "$file/.ruby-version" | sed -e 's/ruby-//g' | tr '\n' ' ';
echo "in folder: $file";
fi
done;
### example: