Skip to content

Instantly share code, notes, and snippets.

View samuel3jackson's full-sized avatar

Salim Rekaibi samuel3jackson

View GitHub Profile
@samuel3jackson
samuel3jackson / sed cheatsheet
Created May 25, 2018 05:46 — forked from un33k/sed cheatsheet
magic of sed -- find and replace "text" in a string or a file
FILE SPACING:
# double space a file
sed G
# double space a file which already has blank lines in it. Output file
# should contain no more than one blank line between lines of text.
sed '/^$/d;G'
@samuel3jackson
samuel3jackson / docker-cleanup-resources.md
Created May 18, 2018 23:46 — forked from bastman/docker-cleanup-resources.md
docker cleanup guide: containers, images, volumes, networks

Docker - How to cleanup (unused) resources

Once in a while, you may need to cleanup resources (containers, volumes, images, networks) ...

delete volumes

// see: https://github.com/chadoe/docker-cleanup-volumes

$ docker volume rm $(docker volume ls -qf dangling=true)

$ docker volume ls -qf dangling=true | xargs -r docker volume rm

Keybase proof

I hereby claim:

  • I am samuel3jackson on github.
  • I am samuel3jackson (https://keybase.io/samuel3jackson) on keybase.
  • I have a public key whose fingerprint is CEAA 0116 45EC 5866 74FE 4FC6 B728 23C7 1C15 311E

To claim this, I am signing this object:

-c 50, -d 10, -t 1M
/covers/googlephotos
*****************************************
Transactions: 570 hits
Availability: 100.00 %
Elapsed time: 59.37 secs
Data transferred: 5.81 MB
Response time: 0.11 secs
Transaction rate: 9.60 trans/sec
Throughput: 0.10 MB/sec
@samuel3jackson
samuel3jackson / strings.xml
Created July 1, 2015 19:25
XLIFF FOR ANDROID FOR GERMAN
<?xml version="1.0" encoding="utf-8"?>
<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
<!-- SECTION: General -->
<string name="yes">Ja</string>
<string name="no">Nein</string>
<string name="ok">OK</string>
<string name="done">FERTIG</string>
<string name="or">oder</string>
<string name="chooser_dialog_title">Aktion durchführen mit</string>
<string name="version">Version</string>
@samuel3jackson
samuel3jackson / de.xliff
Created July 1, 2015 19:24
IOS XLIFF FOR GERMAN
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<xliff xmlns="urn:oasis:names:tc:xliff:document:1.2" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="1.2" xsi:schemaLocation="urn:oasis:names:tc:xliff:document:1.2 http://docs.oasis-open.org/xliff/v1.2/os/xliff-core-1.2-strict.xsd">
<file original="BFTodayExtension/Info.plist" source-language="en" datatype="plaintext" target-language="de">
<header>
<tool tool-id="com.apple.dt.xcode" tool-name="Xcode" tool-version="6.2" build-num="6C131e"/>
</header>
<body>
<trans-unit id="CFBundleDisplayName">
<source>BuzzFeed</source>
</trans-unit>
@samuel3jackson
samuel3jackson / gist:b6282d78be0f41e93660
Last active August 29, 2015 14:23
Fix for Gengo translations
-- QUERY 1
UPDATE `translated_campaigns` SET `full_json` = '{\"buzz_id\":\"3799348\",\"sub_buzz\":[{\"title\":\"Lucas D\'Onofrio, 24, proposed to 21-year-ol Tamara Bruzzo in her hospital room after her last day of chemotherapy, and it was absolutely beautiful.\",\"id\":\"5948307\",\"description\":\"\",\"video_url\":\"http://youtube.com/watch?v=XP-0a0o7Mqk\"},{\"image_height\":\"438\",\"attribution\":\"/https://www.youtube.com/watch?v=XP-0a0o7Mqk\",\"image_url\":\"http://s3-ak.buzzfed.com/static/2015-06/9/17/enhanced/webdr10/anigif_enhanced-12807-1433885671-1.gif\",\"title\":\"After being rushed to the hospital the day before Valentine\'s Day, Tamara \\\"was diagnosed with Non-Hodgkin\'s lymphoma on my birthday, February 24th, 2015,\\\" Lucas said in an email to BuzzFeed. She then had to go through six 96-hour-long infusion sessions.\",\"id\":\"5936145\",\"image_width\":\"625\",\"description\":\"<p>After watching her go through all of the sessions, he knew he had to propose to her when it was all over. \\\"I w